Merge branch 'master' of github.com:ZeusWPI/Haldis
This commit is contained in:
commit
bea56b6a1e
1 changed files with 4 additions and 1 deletions
|
@ -149,7 +149,10 @@ class OrderItem(db.Model):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'Order %d: %s wants %s' % (self.order_id or 0, self.get_name(), self.product.name or 'None')
|
product_name = None
|
||||||
|
if self.product:
|
||||||
|
product_name = self.product.name
|
||||||
|
return 'Order %d: %s wants %s' % (self.order_id or 0, self.get_name(), product_name or 'None')
|
||||||
|
|
||||||
def can_delete(self, order_id, user_id, name):
|
def can_delete(self, order_id, user_id, name):
|
||||||
if int(self.order_id) != int(order_id):
|
if int(self.order_id) != int(order_id):
|
||||||
|
|
Loading…
Reference in a new issue