Fix Message.author on_cascade because cannot be null.
This commit is contained in:
parent
de979011f9
commit
c689a6e44c
|
@ -163,7 +163,7 @@ class Ticket(models.Model):
|
||||||
class Message(models.Model):
|
class Message(models.Model):
|
||||||
ticket = models.ForeignKey('issues.Ticket', on_delete=models.CASCADE,
|
ticket = models.ForeignKey('issues.Ticket', on_delete=models.CASCADE,
|
||||||
verbose_name=_("ticket"), related_name='messages')
|
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')
|
verbose_name=_("author"), related_name='ticket_messages')
|
||||||
author_name = models.CharField(_("author name"), max_length=256, blank=True)
|
author_name = models.CharField(_("author name"), max_length=256, blank=True)
|
||||||
content = models.TextField(_("content"))
|
content = models.TextField(_("content"))
|
||||||
|
|
Loading…
Reference in New Issue