TypeTracking unique_together

This commit is contained in:
2024-05-18 00:02:06 +02:00
parent d89294f0ca
commit 41bdd859d5
3 changed files with 23 additions and 1 deletions

View File

@@ -18,3 +18,6 @@ class Acquisition(models.Model):
class TypeTracking(models.Model):
user = models.ForeignKey("auth.User", related_name="types_tracking", on_delete=models.CASCADE)
type = models.ForeignKey(SDEType, related_name="tracked_by", on_delete=models.CASCADE)
class Meta:
unique_together = [('user', 'type')]