mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 07:22:14 +00:00
Fix is_supervisor returning true if user has any levels
Whoops!
This commit is contained in:
@@ -19,7 +19,7 @@ class Trainee(Profile, RevisionMixin):
|
||||
@property
|
||||
def is_supervisor(self):
|
||||
return self.level_qualifications.all().exclude(confirmed_on=None).select_related('level') \
|
||||
.filter(level__gte=TrainingLevel.SUPERVISOR) \
|
||||
.filter(level__level__gte=TrainingLevel.SUPERVISOR) \
|
||||
.exclude(level__department=TrainingLevel.HAULAGE) \
|
||||
.exclude(level__department__isnull=True).exists()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user