Allow courrier to delete item in order

This commit is contained in:
Jan-Pieter Baert 2019-09-12 18:42:29 +02:00
parent 5e2d5e659c
commit cff24dc096
No known key found for this signature in database
GPG key ID: B19186932178234A

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