This commit is contained in:
2022-01-04 12:08:17 +00:00
parent 2a2f010028
commit fbe4d7271f
5 changed files with 21 additions and 13 deletions

View File

@@ -19,10 +19,9 @@ class Trainee(Profile, RevisionMixin):
@property
def is_technician(self):
return self.level_qualifications.exclude(confirmed_on=None).select_related('level') \
.filter(level__level=TrainingLevel.TECHNICIAN) \
.exclude(level__department=TrainingLevel.HAULAGE) \
.exclude(level__department__isnull=True).exists()
.filter(level__level=TrainingLevel.TECHNICIAN) \
.exclude(level__department=TrainingLevel.HAULAGE) \
.exclude(level__department__isnull=True).exists()
@property
def is_supervisor(self):