diff options
Diffstat (limited to 'servo/models/escalations.py')
-rw-r--r-- | servo/models/escalations.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/servo/models/escalations.py b/servo/models/escalations.py index 924c537..b42d8ca 100644 --- a/servo/models/escalations.py +++ b/servo/models/escalations.py @@ -23,6 +23,7 @@ class Escalation(models.Model): ) gsx_account = models.ForeignKey( GsxAccount, + on_delete=models.SET_NULL, default=defaults.gsx_account, verbose_name=_('GSX Account'), ) @@ -40,7 +41,7 @@ class Escalation(models.Model): ) submitted_at = models.DateTimeField(null=True) updated_at = models.DateTimeField(auto_now=True) - created_by = models.ForeignKey(User, editable=False, null=True) + created_by = models.ForeignKey(User, editable=False, null=True, on_delete=models.SET_NULL) def is_submitted(self): return self.submitted_at is not None |