Revert "IDEMPIERE-5826 iDempiere REST can insert/update an invalid foreign key (#1969)" (#2014)

This reverts commit db833e3665.
This commit is contained in:
Carlos Ruiz 2023-09-19 16:21:08 +02:00 committed by GitHub
parent 4c4981533e
commit 7e5a1d89ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -5753,7 +5753,9 @@ public abstract class PO
} else {
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);
boolean systemAccess = false;
String accessLevel = ft.getAccessLevel();