change cache on picture download

This commit is contained in:
thomas girod
2024-08-06 13:23:34 +02:00
parent 4506440a62
commit d3b203a4a1
4 changed files with 65 additions and 15 deletions

View File

@ -45,12 +45,13 @@ class PicturesController(ControllerBase):
# User can view any moderated picture if he/she is subscribed.
# If not, he/she can view only the one he/she has been identified on
raise PermissionDenied
return (
pictures = list(
filters.filter(Picture.objects.viewable_by(user))
.distinct()
.order_by("-parent__date", "date")
.annotate(album=F("parent__name"))
)
return pictures
@api_controller("/sas/relation", tags="User identification on SAS pictures")