restify album view

This commit is contained in:
thomas girod
2024-08-05 23:40:11 +02:00
parent 0b9ccf6a57
commit da6bd84cdf
7 changed files with 75 additions and 61 deletions

View File

@ -50,7 +50,7 @@ class PicturesController(ControllerBase):
Picture.objects.filter(is_moderated=True, asked_for_removal=False)
)
.distinct()
.order_by("-date")
.order_by("-parent__date", "date")
.annotate(album=F("parent__name"))
)