diff options
Diffstat (limited to 'servo/models/customer.py')
-rw-r--r-- | servo/models/customer.py | 3 |
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) |