marta-jankovics commented on code in PR #3304:
URL: https://github.com/apache/fineract/pull/3304#discussion_r1268705927


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java:
##########
@@ -105,10 +105,11 @@ public CommandProcessingResult createCheck(final 
JsonCommand command) {
                     throw new 
EntityDatatableCheckAlreadyExistsException(entity, status, datatableName);
                 }
             } else {
-                if (entity.equals("m_loan")) {
+                EntityTables entityTable = EntityTables.fromName(entity);
+                if (EntityTables.LOAN.equals(entityTable)) {

Review Comment:
   minor: enum equality can be checked by identity



##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/DatatableCommandFromApiJsonDeserializer.java:
##########
@@ -158,12 +148,9 @@ public void validateForCreate(final String json) {
 
         final String apptableName = 
this.fromApiJsonHelper.extractStringNamed(APPTABLE_NAME, element);
         
baseDataValidator.reset().parameter(APPTABLE_NAME).value(apptableName).notBlank().notExceedingLengthOf(50)
-                .isOneOfTheseValues(SUPPORTED_APPTABLE_NAMES);
+                .isOneOfTheseStringValues(EntityTables.getEntitiesList());

Review Comment:
   This will not allow to create and update 'm_center' but  as we discussed 
I'll fix this



-- 
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]

Reply via email to