From dcc95788c3c4a79cc8ea21f4860ff23110f3bd3b Mon Sep 17 00:00:00 2001 From: Thomas Rusiecki Date: Thu, 5 Dec 2024 21:30:31 -0300 Subject: [PATCH] state institution now nullable --- action/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action/models.py b/action/models.py index aeb0eb0..6a5f76f 100644 --- a/action/models.py +++ b/action/models.py @@ -5,7 +5,7 @@ from django.core.exceptions import ValidationError class State(models.Model): 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) state = models.CharField(max_length=50)