diff options
Diffstat (limited to 'servo/models/shipments.py')
-rw-r--r-- | servo/models/shipments.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/servo/models/shipments.py b/servo/models/shipments.py index 614c642..9f93927 100644 --- a/servo/models/shipments.py +++ b/servo/models/shipments.py @@ -20,7 +20,9 @@ class Shipment(models.Model): RETURN_GPR = 2 # Good Part Return RETURN_CTS = 3 # Convert to stock - location = models.ForeignKey(Location, editable=False) + location = models.ForeignKey(Location, + editable=False, + on_delete=models.SET_NULL) ship_to = models.CharField( default='', @@ -81,6 +83,7 @@ class Shipment(models.Model): settings.AUTH_USER_MODEL, null=True, editable=False, + on_delete=models.SET_NULL, related_name='dispatched_shipments' ) |