diff --git a/backend/db/crud.py b/backend/db/crud.py index 336cc0f939f271d2b69d5872f20e1dd484d9c4a4..853195a6872997706fa95c64a7d6d4b9ba37a8fb 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