carlossortega commented on code in PR #4442:
URL: https://github.com/apache/fineract/pull/4442#discussion_r1996034287
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java:
##########
@@ -317,7 +317,7 @@ public static Long getIdByName(Sheet sheet, String name) {
return 0L;
}
} else {
- return 0L;
+ return null;
Review Comment:
@adamsaghy Yes, it is necessary to change it because the staff name is
optional. If no value is provided, it should return null instead of 0L, as 0
could be interpreted as a valid identifier.
##########
fineract-provider/src/main/java/org/apache/fineract/useradministration/service/UserDataValidator.java:
##########
@@ -124,11 +124,6 @@ public void validateForCreate(final String json) {
final Long officeId =
this.fromApiJsonHelper.extractLongNamed(OFFICE_ID, element);
baseDataValidator.reset().parameter(OFFICE_ID).value(officeId).notNull().integerGreaterThanZero();
- if (this.fromApiJsonHelper.parameterExists(STAFF_ID, element)) {
Review Comment:
@adamsaghy Yes, because the staff name field is optional and should not be
validated as mandatory.
--
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]