ajaxify album loading in the SAS

This commit is contained in:
imperosol
2025-02-21 16:44:56 +01:00
parent 218aab1af3
commit 60db7e2516
4 changed files with 65 additions and 21 deletions

View File

@ -186,10 +186,10 @@ class AlbumView(CanViewMixin, DetailView, FormMixin):
kwargs["clipboard"] = SithFile.objects.filter(
id__in=self.request.session["clipboard"]
)
kwargs["children_albums"] = list(
kwargs["show_albums"] = (
Album.objects.viewable_by(self.request.user)
.filter(parent_id=self.object.id)
.order_by("-date")
.exists()
)
return kwargs