fix index order

This commit is contained in:
j 2025-02-20 08:34:29 -05:00
commit 41c1b1cdec
2 changed files with 6 additions and 3 deletions

View file

@ -312,10 +312,13 @@ class Week(models.Model):
items, _ = Item.public(monday)
return items.order_by('published')
def background(self, now=None):
def background(self, now=None, order_by=None):
if self.use_hue:
colors = []
for item in self.items():
items = self.items()
if order_by:
items = items.order_by(order_by)
for item in items:
if now and item.published >= now:
continue
color = item.get_hue(update=True)