You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/11/21 19:29:17 UTC

[GitHub] [fineract] adamsaghy commented on a diff in pull request #2750: Fix datatable put call with resource id

adamsaghy commented on code in PR #2750:
URL: https://github.com/apache/fineract/pull/2750#discussion_r1028443041


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java:
##########
@@ -1415,14 +1415,22 @@ private CommandProcessingResult updateDatatableEntry(final String dataTableName,
             }
         }
 
-        return new CommandProcessingResultBuilder() //
+        CommandProcessingResultBuilder result = new CommandProcessingResultBuilder() //
+                .withCommandId(command.commandId()) //
                 .withOfficeId(commandProcessingResult.getOfficeId()) //
                 .withGroupId(commandProcessingResult.getGroupId()) //
                 .withClientId(commandProcessingResult.getClientId()) //
                 .withSavingsId(commandProcessingResult.getSavingsId()) //
                 .withLoanId(commandProcessingResult.getLoanId()) //
-                .with(changes) //
-                .build();
+                .with(changes);
+
+        if (command.subentityId() != null) {
+            result = result.withEntityId(command.subentityId());

Review Comment:
   I think we dont need these conditions.
   `
   CommandProcessingResultBuilder result = new CommandProcessingResultBuilder()
   .withEntityId(command.entityId()
   .withSubEntityId(command.subentityId()
   ...
   `



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org