IDEMPIERE-2756 Background threads losing context when user log out - fix validation

This commit is contained in:
Carlos Ruiz 2015-08-11 12:11:43 -05:00
parent 9397af1b11
commit 6ff666e30c
1 changed files with 1 additions and 3 deletions

View File

@ -425,8 +425,6 @@ public abstract class PO
*/ */
public Properties getCtx() public Properties getCtx()
{ {
if (p_ctx.size() == 0 && Env.getCtx().size() > 0)
p_ctx = Env.getCtx();
return p_ctx; return p_ctx;
} // getCtx } // getCtx
@ -4676,7 +4674,7 @@ public abstract class PO
} }
private void checkValidContext() { private void checkValidContext() {
if (getCtx().size() == 0) if (getCtx().isEmpty() && getCtx().getProperty("#AD_Client_ID") == null)
throw new AdempiereException("Context lost"); throw new AdempiereException("Context lost");
} }