Handle NPE in warehouses when login using System Administrator role
This commit is contained in:
parent
659edb3d55
commit
0033e8abd2
|
@ -154,6 +154,8 @@ public class AbstractService {
|
||||||
if (!okwh)
|
if (!okwh)
|
||||||
return "Error logging in - warehouse not allowed for this org";
|
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);
|
String error = login.validateLogin(orglogin);
|
||||||
if (error != null && error.length() > 0)
|
if (error != null && error.length() > 0)
|
||||||
|
|
Loading…
Reference in New Issue