IDEMPIERE-3439 IDEMPIERE-3936 - foreign constraints - fix NPE

This commit is contained in:
Carlos Ruiz 2019-06-17 17:28:51 +02:00
parent ed6a4133e0
commit 429d0d47b3
1 changed files with 9 additions and 6 deletions

View File

@ -809,12 +809,15 @@ public class MColumn extends X_AD_Column
foreignTable = "AD_Chart"; foreignTable = "AD_Chart";
} }
if (foreignTable.equals("AD_AllClients_V")) if (foreignTable != null) {
foreignTable = "AD_Client"; if (foreignTable.equals("AD_AllClients_V")) {
else if (foreignTable.equals("AD_AllUsers_V")) foreignTable = "AD_Client";
foreignTable = "AD_User"; } else if (foreignTable.equals("AD_AllUsers_V")) {
else if (foreignTable.equals("AD_AllRoles_V")) foreignTable = "AD_User";
foreignTable = "AD_Role"; } else if (foreignTable.equals("AD_AllRoles_V")) {
foreignTable = "AD_Role";
}
}
return foreignTable; return foreignTable;
} }