mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 00:42:17 +00:00
Validate that only supervisors may be supervisors
This commit is contained in:
@@ -10,6 +10,7 @@ class Trainee(Profile):
|
||||
|
||||
@property
|
||||
def is_supervisor(self):
|
||||
# FIXME Efficiency
|
||||
for level_qualification in self.levels.select_related('level').all():
|
||||
if confirmed_on is not None and level_qualification.level.level >= TrainingLevel.SUPERVISOR:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user