commit | 93c836c86dbe2b0f860addfed50dda485b5ab742 | [log] [tgz] |
---|---|---|
author | Nabin Hait <nabinhait@gmail.com> | Thu Oct 10 19:15:58 2013 +0530 |
committer | Nabin Hait <nabinhait@gmail.com> | Thu Oct 10 19:15:58 2013 +0530 |
tree | 00351765076c9df13f478b5d6f0ef22de085eab2 | |
parent | 2658384edd45051d190dc902ffa523288bff4f50 [diff] |
[fix] [minor] validate warehouse user
diff --git a/stock/utils.py b/stock/utils.py index 1f50164..983ee72 100644 --- a/stock/utils.py +++ b/stock/utils.py
@@ -209,7 +209,7 @@ return wlist def validate_warehouse_user(warehouse): - if webnotes.session.user=="Administrator": + if webnotes.session.user=="Administrator" or not warehouse: return warehouse_users = [p[0] for p in webnotes.conn.sql("""select user from `tabWarehouse User` where parent=%s""", warehouse)]