mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-10-11 23:25:46 +00:00
Allow technicians to record training sessions (#664)
* Allow technicians to record training sessions Add a per-item technician_can_train flag. Technicians in an item's department who are passed out on a flagged item may log Training Started/Complete for it. * Run linter
This commit is contained in:
@@ -47,6 +47,12 @@ class Profile(AbstractUser):
|
||||
|
||||
reversion_hide = True
|
||||
|
||||
@property
|
||||
def can_log_training(self):
|
||||
from training.models import Trainee
|
||||
|
||||
return self.is_supervisor or Trainee.objects.get(pk=self.pk).is_technician
|
||||
|
||||
@classmethod
|
||||
def make_api_key(cls):
|
||||
size = 20
|
||||
|
||||
Reference in New Issue
Block a user