IDEMPIERE-6181 - Fix MBPartner.getPrimaryAD_User_ID() returning 0 when the business partner has no contacts (#2405)

This commit is contained in:
Diego Ruiz 2024-07-03 09:47:47 +02:00 committed by Carlos Ruiz
parent b28edf2be1
commit b118283530
1 changed files with 2 additions and 2 deletions

View File

@ -686,7 +686,7 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
/**
* Get Primary AD_User_ID
* @return AD_User_ID or 0
* @return AD_User_ID or -1
*/
public int getPrimaryAD_User_ID()
{
@ -697,7 +697,7 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
setPrimaryAD_User_ID(users[0].getAD_User_ID());
}
if (m_primaryAD_User_ID == null)
return 0;
return -1;
return m_primaryAD_User_ID.intValue();
} // getPrimaryAD_User_ID