Merge pull request #144 from ZeusWPI/order-courier-delete-items

Allow courrier to delete item in order
This commit is contained in:
redfast00 2019-09-14 00:14:52 +02:00 committed by GitHub
commit 33d2575271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,6 +49,6 @@ class OrderItem(db.Model):
if user_id is None: if user_id is None:
return False return False
user = User.query.filter(User.id == user_id).first() 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 True
return False return False