From c689a6e44cd26f86686292563bbaa62f37ef4d4d Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 22 Apr 2021 10:52:33 +0200 Subject: [PATCH] Fix Message.author on_cascade because cannot be null. --- orchestra/contrib/issues/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestra/contrib/issues/models.py b/orchestra/contrib/issues/models.py index aa1e51b0..8c783ea3 100644 --- a/orchestra/contrib/issues/models.py +++ b/orchestra/contrib/issues/models.py @@ -163,7 +163,7 @@ class Ticket(models.Model): class Message(models.Model): ticket = models.ForeignKey('issues.Ticket', on_delete=models.CASCADE, verbose_name=_("ticket"), related_name='messages') - author = models.ForeignKey(djsettings.AUTH_USER_MODEL, on_delete=models.SET_NULL, + author = models.ForeignKey(djsettings.AUTH_USER_MODEL, on_delete=models.CASCADE, verbose_name=_("author"), related_name='ticket_messages') author_name = models.CharField(_("author name"), max_length=256, blank=True) content = models.TextField(_("content"))