diff --git a/app/item/models.py b/app/item/models.py index f086019..73fb505 100644 --- a/app/item/models.py +++ b/app/item/models.py @@ -83,6 +83,9 @@ class Item(models.Model): elif not first_post: while qs.exists() and not first_post: monday = monday - timedelta(days=7) + current_week = Week.objects.filter(monday=monday).first() + if current_week and current_week.is_break: + return current_week, qs first_post = qs.filter(published__gt=monday).first() week = qs.filter(published__gt=monday) else: