From f4ba2c109608ef41347e0eb8933904f0fed5da36 Mon Sep 17 00:00:00 2001 From: http Date: Sun, 16 Apr 2017 12:41:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=B0=D1=82=D1=83=D0=BF=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B8=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- abonapp/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abonapp/models.py b/abonapp/models.py index 87476a7..c50a3b8 100644 --- a/abonapp/models.py +++ b/abonapp/models.py @@ -360,7 +360,7 @@ class InvoiceForPayment(models.Model): comment = models.CharField(max_length=128) date_create = models.DateTimeField(auto_now_add=True) date_pay = models.DateTimeField(blank=True, null=True) - author = models.ForeignKey(UserProfile, related_name='+', on_delete=models.C, blank=True, null=True) + author = models.ForeignKey(UserProfile, related_name='+', on_delete=models.SET_NULL, blank=True, null=True) def __str__(self): return "%s -> %.2f" % (self.abon.username, self.amount)