Merge pull request #144 from ZeusWPI/order-courier-delete-items
Allow courrier to delete item in order
This commit is contained in:
commit
33d2575271
1 changed files with 1 additions and 1 deletions
|
@ -49,6 +49,6 @@ class OrderItem(db.Model):
|
|||
if user_id is None:
|
||||
return False
|
||||
user = User.query.filter(User.id == user_id).first()
|
||||
if user and user.is_admin():
|
||||
if user and (user.is_admin() or user == self.order.courrier):
|
||||
return True
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue