Properties rework, States, StatesDefinitions, DeviceLog, and Notes #37

Merged
pedro merged 119 commits from feature/states into main 2025-02-10 12:05:58 +00:00
Showing only changes of commit 5fcd9ce7ca - Show all commits

View file

@ -27,7 +27,9 @@ class StateDefinition(models.Model):
state = models.CharField(max_length=50)
class Meta:
unique_together = ('institution', 'state')
constraints = [
models.UniqueConstraint(fields=['institution', 'state'], name='unique_institution_state')
]
def __str__(self):
return f"{self.institution.name} - {self.state}"