adamsaghy commented on code in PR #4585:
URL: https://github.com/apache/fineract/pull/4585#discussion_r2053837177
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java:
##########
@@ -354,26 +354,14 @@ public CommandProcessingResult updateFamilyMember(Long
familyMemberId, JsonComma
@Override
public CommandProcessingResult deleteFamilyMember(Long
clientFamilyMemberId, JsonCommand command) {
- // TODO Auto-generated method stub
-
this.context.authenticatedUser();
apiJsonDeserializer.validateForDelete(clientFamilyMemberId);
- ClientFamilyMembers clientFamilyMember = null;
-
- if (clientFamilyMemberId != null) {
- clientFamilyMember =
clientFamilyRepository.getReferenceById(clientFamilyMemberId);
- clientFamilyRepository.delete(clientFamilyMember);
-
- }
+ ClientFamilyMembers clientFamilyMember =
clientFamilyRepository.getReferenceById(clientFamilyMemberId);
+ clientFamilyRepository.delete(clientFamilyMember);
Review Comment:
`deleteById` might be better approach here...
--
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]