~gjasso/fd-seminar-greenlight

959cfe0425bf8dac8fb3c69b5e2326ede15629e5 — Ahmad Farhat 2 months ago f9e85aa
Fixed user create task failing with invalid role (#1751)

1 files changed, 3 insertions(+), 0 deletions(-)

M lib/tasks/user.rake
M lib/tasks/user.rake => lib/tasks/user.rake +3 -0
@@ 24,6 24,9 @@ namespace :user do
      exit
    end

    # 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"
      exit