state institution now nullable

This commit is contained in:
Thomas Nahuel Rusiecki 2024-12-05 21:30:31 -03:00
parent f9674b4ad8
commit dcc95788c3

View file

@ -5,7 +5,7 @@ from django.core.exceptions import ValidationError
class State(models.Model): class State(models.Model):
date = models.DateTimeField(auto_now_add=True) date = models.DateTimeField(auto_now_add=True)
institution = models.ForeignKey(Institution, on_delete=models.CASCADE) institution = models.ForeignKey(Institution, on_delete=models.SET_NULL, null=True)
user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True)
state = models.CharField(max_length=50) state = models.CharField(max_length=50)