aboutsummaryrefslogtreecommitdiffstats
path: root/servo/models/customer.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2021-05-12 15:09:06 +0300
committerFilipp Lepalaan <filipp@mac.com>2021-05-12 15:09:06 +0300
commit0d01e3a1daf608addb737101b073fd1890ba7c6a (patch)
tree082c71df6212963b29c35bd35e2288ec3c5004e3 /servo/models/customer.py
parent6672d03666fdf6fae3b2a074c75ac20f5dbd0ba7 (diff)
downloadServo-0d01e3a1daf608addb737101b073fd1890ba7c6a.tar.gz
Servo-0d01e3a1daf608addb737101b073fd1890ba7c6a.tar.bz2
Servo-0d01e3a1daf608addb737101b073fd1890ba7c6a.zip
Stop using Sites, Django 3 fixes
Diffstat (limited to 'servo/models/customer.py')
-rw-r--r--servo/models/customer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/servo/models/customer.py b/servo/models/customer.py
index a6609d0..f83515d 100644
--- a/servo/models/customer.py
+++ b/servo/models/customer.py
@@ -45,6 +45,7 @@ class Customer(MPTTModel):
'self',
null=True,
blank=True,
+ on_delete=models.CASCADE,
related_name='contacts',
verbose_name=_('company'),
limit_choices_to={'is_company': True}
@@ -289,7 +290,7 @@ class Customer(MPTTModel):
class ContactInfo(models.Model):
- customer = models.ForeignKey(Customer)
+ customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
key = models.CharField(max_length=255)
value = models.CharField(max_length=255)