Edit beneficiaries handler to show diags related to a beneficiary

This commit is contained in:
Nicolas CARON 2024-12-04 16:16:30 +01:00
parent 1c4371b121
commit 064cb2df16
1 changed files with 4 additions and 1 deletions

View File

@ -326,7 +326,10 @@ func (h *ApplicationHandler) BeneficiaryDisplay(w http.ResponseWriter, r *http.R
} }
for _, d := range diagsresp.Diags { for _, d := range diagsresp.Diags {
diag = append(diag, d.ToStorageType()) diagData := d.Data.AsMap()
if beneficiary, ok := diagData["beneficiary"].(string); ok && beneficiary == beneficiaryID {
diag = append(diag, d.ToStorageType())
}
} }
groupsrequest := &groupsmanagement.GetGroupsRequest{ groupsrequest := &groupsmanagement.GetGroupsRequest{