KEYCLOAK-14057 Fix resource not found error when creating policy

This commit is contained in:
stianst 2020-05-06 08:57:59 +02:00 committed by Stian Thorgersen
parent 0d0617d44a
commit 2be61246f4

View file

@ -161,7 +161,7 @@ public class PolicyService {
Policy model = storeFactory.getPolicyStore().findByName(name, this.resourceServer.getId());
if (model == null) {
throw new NotFoundException();
return Response.noContent().build();
}
return Response.ok(toRepresentation(model, fields, authorization)).build();