-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.0.5
-
Fix Version/s: 2.0.6
-
Component/s: APIs, Integrations and Extension Points
-
Labels:None
-
Git Pull Request:
When creating a Personal Commerce Account via the dedicated method addPersonalCommerceAccount in CommerceAccountLocalServiceImpl, an exception is thrown by the subsequent method addCommerceAccount because there is no userId in serviceContext :
... public CommerceAccount addPersonalCommerceAccount( long userId, String taxId, String externalReferenceCode, ServiceContext serviceContext) throws PortalException { ...
... public CommerceAccount addCommerceAccount( String name, long parentCommerceAccountId, String email, String taxId, int type, boolean active, String externalReferenceCode, ServiceContext serviceContext) throws PortalException { // Commerce Account User user = userLocalService.getUser(serviceContext.getUserId()); ...
The userId should be set by the first method, using the passed parameter.