Unverified Commit 959cfe04 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fixed user create task failing with invalid role (#1751)

parent f9e85aad
......@@ -24,6 +24,9 @@ namespace :user do
# Create the default roles if not already created
Role.create_default_roles(u[:provider]) if Role.where(provider: u[:provider]).count.zero?
unless Role.exists?(name: u[:role], provider: u[:provider])
puts "Invalid Role - Role does not exist"
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