mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-29 11:22:15 +00:00
Force trainingitemqualifications to be unique
This commit is contained in:
@@ -74,6 +74,9 @@ class TrainingItemQualification(models.Model):
|
||||
if level.user_has_requirements(self.trainee):
|
||||
level_qualification = TrainingLevelQualification.objects.create(trainee=self.trainee, level=level)
|
||||
|
||||
class Meta:
|
||||
unique_together = ["trainee", "item", "depth"]
|
||||
|
||||
|
||||
# Levels
|
||||
class TrainingLevel(models.Model, RevisionMixin):
|
||||
|
||||
Reference in New Issue
Block a user