state institution now nullable

This commit is contained in:
Thomas Nahuel Rusiecki 2024-12-05 21:30:31 -03:00 committed by Cayo Puigdefabregas
parent d9ae4c61ab
commit 59e99f5ee6

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)