aboutsummaryrefslogtreecommitdiffstats
path: root/servo/models
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-10-01 00:51:31 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-10-01 00:51:31 +0300
commit88e291a6ed830f11671f04893031eec2291a6703 (patch)
tree2dd0ebad107564f671d0f093471f8a195f9733e7 /servo/models
parenta86f9fd664c2db803450f5c67ae79c6b3cc94545 (diff)
downloadServo-88e291a6ed830f11671f04893031eec2291a6703.tar.gz
Servo-88e291a6ed830f11671f04893031eec2291a6703.tar.bz2
Servo-88e291a6ed830f11671f04893031eec2291a6703.zip
POI.created_by is null=True
Diffstat (limited to 'servo/models')
-rw-r--r--servo/models/purchases.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/servo/models/purchases.py b/servo/models/purchases.py
index 3a59a9b..d32c936 100644
--- a/servo/models/purchases.py
+++ b/servo/models/purchases.py
@@ -295,7 +295,8 @@ class PurchaseOrderItem(AbstractOrderItem):
self.purchase_order_ref = self.purchase_order.reference
if self.user_fullname == '':
- self.user_fullname = self.created_by.get_name()
+ user = self.created_by or self.purchase_order.created_by
+ self.user_fullname = user.get_name()
super(PurchaseOrderItem, self).save(*args, **kwargs)