IDEMPIERE-3690 java.lang.NullPointerException when inactive al document status

This commit is contained in:
Carlos Ruiz 2018-04-17 10:33:40 +02:00
parent 75b817b087
commit a9a3218517
1 changed files with 1 additions and 3 deletions

View File

@ -56,15 +56,13 @@ public class WDocumentStatusPanel extends Panel {
/** /**
* Get Panel if User has Document Status Indicators * Get Panel if User has Document Status Indicators
* @return panel pr null * @return panel
*/ */
public static WDocumentStatusPanel get() public static WDocumentStatusPanel get()
{ {
int AD_User_ID = Env.getAD_User_ID(Env.getCtx()); int AD_User_ID = Env.getAD_User_ID(Env.getCtx());
int AD_Role_ID = Env.getAD_Role_ID(Env.getCtx()); int AD_Role_ID = Env.getAD_Role_ID(Env.getCtx());
MDocumentStatus[] indicators = MDocumentStatus.getDocumentStatusIndicators(Env.getCtx(), AD_User_ID, AD_Role_ID); MDocumentStatus[] indicators = MDocumentStatus.getDocumentStatusIndicators(Env.getCtx(), AD_User_ID, AD_Role_ID);
if (indicators.length == 0)
return null;
return new WDocumentStatusPanel(indicators); return new WDocumentStatusPanel(indicators);
} }