diff --git a/backend/db/crud.py b/backend/db/crud.py index 842ed1a8b3d26a28148ddf0e6249c478836e85d7..64a1a8fcbd5950eaf1b41c43d368537466ae1655 100644 --- a/backend/db/crud.py +++ b/backend/db/crud.py @@ -243,7 +243,7 @@ def get_news(place: str, admin: bool, db: Session): models.OpeningHours.open_time).all() next_time_slot = None for open_time, close_time, day in opening_hours: - next_date = current_date + timedelta(days=day-current_date.weekday()) + next_date = current_date + timedelta(days=day - current_date.weekday()) if day < current_date.weekday(): next_date = next_date + timedelta(days=7) next_time_slot = datetime.combine(next_date.date(), open_time) @@ -265,7 +265,7 @@ def get_news(place: str, admin: bool, db: Session): place=place, published_at=current_date) news.append(closure_news) - + return news