IDEMPIERE-4815 FIX Check C_Country_ID when getting cached data. (#708)
This commit is contained in:
parent
01d199755b
commit
d45ee838e3
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue