summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/organization_policies_endpoint.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef_zero/endpoints/organization_policies_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/organization_policies_endpoint.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef_zero/endpoints/organization_policies_endpoint.rb b/lib/chef_zero/endpoints/organization_policies_endpoint.rb
index b799fa7..c1848f5 100644
--- a/lib/chef_zero/endpoints/organization_policies_endpoint.rb
+++ b/lib/chef_zero/endpoints/organization_policies_endpoint.rb
@@ -40,11 +40,11 @@ module ChefZero
# /policies/:policy_name/revisions/:revision_id
if request.rest_path[-2] == "revisions"
- if exists_data?(request, nil)
+ if !exists_data?(request, nil)
+ return error(404, "Revision ID #{request.rest_path.last} not found" )
+ else
data = get_data(request)
return already_json_response(200, data)
- else
- return error(404, "Revision ID #{request.rest_path.last} not found" )
end
end
end