Add the unique together constraint to TrainingRecord model and actually commit the migration this time.

This commit is contained in:
Tom Price
2015-10-22 00:19:05 +01:00
parent 80ba59c3ba
commit 697a5977c8
2 changed files with 76 additions and 0 deletions

View File

@@ -35,6 +35,9 @@ class TrainingRecord(models.Model):
assessed_trainer = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='trainingrecords_assessed')
assessed_notes = models.TextField(blank=True, null=True)
class Meta:
unique_together = ('trainee', 'training_item')
@reversion.register
class TrainingLevelRecord(models.Model):