IDEMPIERE-4815 FIX Check C_Country_ID when getting cached data. (#708)

This commit is contained in:
igorpojzl 2021-06-03 10:19:54 +02:00 committed by GitHub
parent 01d199755b
commit d45ee838e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,8 @@ public class MCountry extends X_C_Country
*/ */
public static MCountry get (Properties ctx, int C_Country_ID) public static MCountry get (Properties ctx, int C_Country_ID)
{ {
if(C_Country_ID <= 0)
return null;
loadAllCountriesIfNeeded(); loadAllCountriesIfNeeded();
MCountry c = s_countries.get(ctx, C_Country_ID, e -> new MCountry(ctx, e)); MCountry c = s_countries.get(ctx, C_Country_ID, e -> new MCountry(ctx, e));
if (c != null) if (c != null)