diff --git a/ordr2/views/orders.py b/ordr2/views/orders.py index 264cab4..fc49300 100644 --- a/ordr2/views/orders.py +++ b/ordr2/views/orders.py @@ -37,7 +37,9 @@ def change_in_order_status(request, order, old): order.completed_date = datetime.utcnow() order.completed_by = request.user.user_name - if noteworthy: + if noteworthy and order.created_by != request.user.user_name: + # only notify if the user who changed the order is not the one who + # created it in the first place account = request.dbsession.\ query(User).\ filter_by(user_name=order.created_by).\