1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-08-31 17:05:21 +02:00

INSTALLED_APPS checks

This commit is contained in:
Ehouarn
2025-08-30 01:55:03 +02:00
parent 99a90867cc
commit 2a638e7b32
3 changed files with 13 additions and 7 deletions

View File

@@ -207,9 +207,10 @@ class UserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView):
modified_note.is_active = True
context["can_unlock_note"] = not user.note.is_active and PermissionBackend\
.check_perm(self.request, "note.change_noteuser_is_active", modified_note)
families = Family.objects.filter(memberships__user=user).distinct()
context["families"] = families
if 'family' in settings.INSTALLED_APPS:
context["family_app_installed"] = True
families = Family.objects.filter(memberships__user=user).distinct()
context["families"] = families
return context