IDEMPIERE-3690 java.lang.NullPointerException when inactive al document status
This commit is contained in:
parent
75b817b087
commit
a9a3218517
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue