Skip to content
Snippets Groups Projects
Unverified Commit a2a63ba5 authored by Samuel Couillard's avatar Samuel Couillard Committed by GitHub
Browse files

Fix oversight in Role migration (#5358)

parent b85696a0
Branches
Tags
No related merge requests found
......@@ -48,7 +48,7 @@ module Api
role_hash = role_params.to_h
# Returns an error if the provider does not exist
if role_hash[:provider] != 'greenlight' && Tenant.find_by(provider: role_hash[:provider]).nil?
unless role_hash[:provider] == 'greenlight' || Tenant.exists?(name: role_hash[:provider])
return render_error(status: :bad_request, errors: 'Provider does not exist')
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment