Commit 5915979b authored by Martin Lowe's avatar Martin Lowe 🇨🇦
Browse files

Add check to return empty list if no matching wg for org when set

parent 1c61c8a5
......@@ -116,6 +116,9 @@ public class OrganizationResource extends AbstractRESTResource {
wrap.setParam(FoundationDBParameterNames.DOCUMENT_IDS.getName(), docids);
} else if(wg == null && StringUtils.isNotBlank(workingGroup)) {
// return empty response if wg was set but no results
return Response.ok(Collections.emptyList()).build();
List<MemberOrganization> orgs = orgService.get(wrap);
if (orgs.isEmpty()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment