Handle NPE in warehouses when login using System Administrator role

This commit is contained in:
Elaine Tan 2013-03-21 14:12:03 +08:00
parent 659edb3d55
commit 0033e8abd2
1 changed files with 2 additions and 0 deletions

View File

@ -154,6 +154,8 @@ public class AbstractService {
if (!okwh)
return "Error logging in - warehouse not allowed for this org";
}
else if (warehouses == null && loginRequest.getWarehouseID() > 0)
return "Error logging in - warehouse not allowed for this org";
String error = login.validateLogin(orglogin);
if (error != null && error.length() > 0)