IDEMPIERE-5826 iDempiere REST can insert/update an invalid foreign key (#1969)
This commit is contained in:
parent
66b7b20619
commit
db833e3665
|
@ -5757,9 +5757,7 @@ public abstract class PO
|
||||||
} else {
|
} else {
|
||||||
fkval = Integer.valueOf(get_ValueAsInt(index));
|
fkval = Integer.valueOf(get_ValueAsInt(index));
|
||||||
}
|
}
|
||||||
if (fkval != null
|
if (fkval != null) {
|
||||||
&& ( (fkval instanceof Integer && ((Integer)fkval).intValue() > 0)
|
|
||||||
|| (fkval instanceof String && ((String)fkval).length() > 0) )) {
|
|
||||||
MTable ft = MTable.get(getCtx(), fktab);
|
MTable ft = MTable.get(getCtx(), fktab);
|
||||||
boolean systemAccess = false;
|
boolean systemAccess = false;
|
||||||
String accessLevel = ft.getAccessLevel();
|
String accessLevel = ft.getAccessLevel();
|
||||||
|
|
Loading…
Reference in New Issue