Aman-Mittal commented on code in PR #6076:
URL: https://github.com/apache/fineract/pull/6076#discussion_r3519350206


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformServiceImpl.java:
##########
@@ -101,14 +103,18 @@ public List<ClientFamilyMembersData> 
getClientFamilyMembers(long clientId) {
     }
 
     @Override
-    public ClientFamilyMembersData getClientFamilyMember(long id) {
+    public ClientFamilyMembersData getClientFamilyMember(long clientId, long 
familyMemberId) {
 
         this.context.authenticatedUser();
 
         final ClientFamilyMembersMapper rm = new ClientFamilyMembersMapper();
-        final String sql = "select " + rm.schema() + " where fmb.id=? ";
+        final String sql = "select " + rm.schema() + " where fmb.client_id=? 
and fmb.id=? ";
 
-        return this.jdbcTemplate.queryForObject(sql, rm, id); // NOSONAR
+        try {
+            return this.jdbcTemplate.queryForObject(sql, rm, clientId, 
familyMemberId); // NOSONAR
+        } catch (final EmptyResultDataAccessException e) {
+            throw new FamilyMemberNotFoundException(familyMemberId, clientId, 
e);

Review Comment:
   Can you share what will b the new error message after this change.



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