mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 22:42:17 +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):
|
if level.user_has_requirements(self.trainee):
|
||||||
level_qualification = TrainingLevelQualification.objects.create(trainee=self.trainee, level=level)
|
level_qualification = TrainingLevelQualification.objects.create(trainee=self.trainee, level=level)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
unique_together = ["trainee", "item", "depth"]
|
||||||
|
|
||||||
|
|
||||||
# Levels
|
# Levels
|
||||||
class TrainingLevel(models.Model, RevisionMixin):
|
class TrainingLevel(models.Model, RevisionMixin):
|
||||||
|
|||||||
Reference in New Issue
Block a user