Skip to content

Commit

Permalink
Merge pull request #6554 from CartoDB/fix-google-services-rake
Browse files Browse the repository at this point in the history
Fixes google services rake for delete for all
  • Loading branch information
gfiorav committed Feb 10, 2016
2 parents 1c16bb8 + 06d48f7 commit 5a456a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/tasks/google_services.rake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace :cartodb do
[:google_maps_key, :google_maps_private_key, :org_name] => [:environment] do |task, args|
organization = Carto::Organization.where(name: args[:org_name]).first

raise "No organization with username '#{args[:org_name]}'" if organization.nil?
raise "No organization with name '#{args[:org_name]}'" if organization.nil?

puts "Enabling google services for organization '#{organization.name}'..."

Expand Down Expand Up @@ -79,7 +79,7 @@ namespace :cartodb do
task :disable_for_organization, [:org_name] => [:environment] do |task, args|
organization = Carto::Organization.where(name: args[:org_name]).first

raise "No organization with username '#{args[:org_name]}'" if organization.nil?
raise "No organization with name '#{args[:org_name]}'" if organization.nil?

puts "Disabling google services for organization '#{organization.name}'..."

Expand All @@ -90,8 +90,8 @@ namespace :cartodb do
end

desc 'Disable Google Services for all users'
task :disable_for_all do |task|
Carto::Organization.each do |organization|
task :disable_for_all => [:environment] do |task|
Carto::Organization.all.each do |organization|
puts "Disabling google services for organization '#{organization.name}'..."

organization.google_maps_key = nil
Expand Down

0 comments on commit 5a456a2

Please sign in to comment.