Fix crash in admin panel
This commit is contained in:
parent
d41be22d42
commit
2208c44a8d
1 changed files with 4 additions and 1 deletions
|
@ -91,7 +91,10 @@ class Order(db.Model):
|
||||||
self.stoptime = stoptime
|
self.stoptime = stoptime
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
if self.location:
|
||||||
return 'Order %d @ %s' % (self.id, self.location.name or 'None')
|
return 'Order %d @ %s' % (self.id, self.location.name or 'None')
|
||||||
|
else:
|
||||||
|
return 'Order %d' % (self.id)
|
||||||
|
|
||||||
def group_by_user(self):
|
def group_by_user(self):
|
||||||
group = dict()
|
group = dict()
|
||||||
|
|
Loading…
Reference in a new issue