diff --git a/lib/gzr/commands/dashboard/import.rb b/lib/gzr/commands/dashboard/import.rb index f42e4c9..6156df6 100644 --- a/lib/gzr/commands/dashboard/import.rb +++ b/lib/gzr/commands/dashboard/import.rb @@ -62,7 +62,7 @@ def sync_dashboard(source,target_space_id) if @options[:force] then say_ok "Modifying existing dashboard #{existing_dashboard.id} #{existing_dashboard[:title]} in space #{target_space_id}" new_dash = source.select do |k,v| - (keys_to_keep('update_dashboard') - [:space_id,:user_id,:title]).include? k + (keys_to_keep('update_dashboard') - [:space_id,:user_id,:title,:slug]).include? k end return update_dashboard(existing_dashboard.id,new_dash) else @@ -70,7 +70,7 @@ def sync_dashboard(source,target_space_id) end else new_dash = source.select do |k,v| - (keys_to_keep('create_dashboard') - [:space_id,:user_id]).include? k + (keys_to_keep('create_dashboard') - [:space_id,:user_id,:slug]).include? k end new_dash[:space_id] = target_space_id new_dash[:user_id] = @me.id diff --git a/lib/gzr/modules/look.rb b/lib/gzr/modules/look.rb index 8efd05b..ebf1ff4 100644 --- a/lib/gzr/modules/look.rb +++ b/lib/gzr/modules/look.rb @@ -69,7 +69,7 @@ def upsert_look(user_id, query_id, space_id, source_look) if @options[:force] then say_ok "Modifying existing Look #{source_look[:title]} in space #{space_id}" new_look = source_look.select do |k,v| - (keys_to_keep('update_look') - [:space_id,:user_id,:query_id]).include? k + (keys_to_keep('update_look') - [:space_id,:user_id,:query_id,:slug]).include? k end new_look[:query_id] = query_id return update_look(existing_looks.first.id,new_look) @@ -78,7 +78,7 @@ def upsert_look(user_id, query_id, space_id, source_look) end else new_look = source_look.select do |k,v| - (keys_to_keep('create_look') - [:space_id,:user_id,:query_id]).include? k + (keys_to_keep('create_look') - [:space_id,:user_id,:query_id,:slug]).include? k end new_look[:query_id] = query_id new_look[:user_id] = user_id