IDEMPIERE-4677: get client id from MRole instead of from context (#2250)
Calling Env.getAD_Client_ID(getCtx()) within the loadOrgAccessUser function can cause issues if the context is not yet logged in. To avoid this, it's recommended to use getAD_Client_ID() directly instead.
This commit is contained in:
parent
b46291d33a
commit
4f3c18730d
|
@ -856,7 +856,7 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport
|
||||||
{
|
{
|
||||||
pstmt = DB.prepareStatement(sql, get_TrxName());
|
pstmt = DB.prepareStatement(sql, get_TrxName());
|
||||||
pstmt.setInt(1, getAD_User_ID());
|
pstmt.setInt(1, getAD_User_ID());
|
||||||
pstmt.setInt(2, Env.getAD_Client_ID(getCtx()));
|
pstmt.setInt(2, getAD_Client_ID());
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
|
@ -888,7 +888,7 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport
|
||||||
{
|
{
|
||||||
pstmt = DB.prepareStatement(sql, get_TrxName());
|
pstmt = DB.prepareStatement(sql, get_TrxName());
|
||||||
pstmt.setInt(1, getAD_Role_ID());
|
pstmt.setInt(1, getAD_Role_ID());
|
||||||
pstmt.setInt(2, Env.getAD_Client_ID(getCtx()));
|
pstmt.setInt(2, getAD_Client_ID());
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue