adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1039796013
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##########
@@ -229,7 +232,7 @@ public static Client createNew(final AppUser currentUser,
final Office clientOff
final Integer legalForm, final JsonCommand command) {
final String accountNo =
command.stringValueOfParameterNamed(ClientApiConstants.accountNoParamName);
- final String externalId =
command.stringValueOfParameterNamed(ClientApiConstants.externalIdParamName);
+ final ExternalId externalId = ExternalId.empty();
Review Comment:
It cannot be empty, you should fetch it from the command and if the
configuration is enabled, generate new one. It worth to extract this logic out
from the entity. Use a factory / producer to get the data from the command and
call the proper constructor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]