From 43774a59700438bf8aeb1132433f4b56dbd5ce1f Mon Sep 17 00:00:00 2001 From: magicfelix <felix@felix-zauberer.de> Date: Thu, 18 Apr 2024 17:13:04 +0200 Subject: [PATCH] Reformat --- .../coursebook/documentation/LessonInformation.vue | 3 +-- aleksis/apps/alsijil/util/predicates.py | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonInformation.vue b/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonInformation.vue index 3222f5c70..09a04bcb6 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonInformation.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonInformation.vue @@ -42,8 +42,7 @@ import PersonChip from "aleksis.core/components/person/PersonChip.vue"; <subject-chip v-if=" documentation?.amends?.amends?.subject && - documentation.amends.amends.subject.id !== - documentation.subject.id + documentation.amends.amends.subject.id !== documentation.subject.id " :subject="documentation.amends.amends.subject" v-bind="compact ? dialogActivator.attrs : {}" diff --git a/aleksis/apps/alsijil/util/predicates.py b/aleksis/apps/alsijil/util/predicates.py index 652a4fa78..fe7746948 100644 --- a/aleksis/apps/alsijil/util/predicates.py +++ b/aleksis/apps/alsijil/util/predicates.py @@ -391,10 +391,7 @@ def is_documentation_teacher(user: User, obj: Documentation): if not str(obj.pk).startswith("DUMMY") and hasattr(obj, "teachers"): teachers = obj.teachers elif obj.amends.amends: - if obj.amends.teachers: - teachers = obj.amends.teachers - else: - teachers = obj.amends.amends.teachers + teachers = obj.amends.teachers if obj.amends.teachers else obj.amends.amends.teachers else: teachers = obj.amends.teachers return user.person in teachers.all() -- GitLab