From dfebcb89e64d2e4b3ebd2d69b6ae386b6fcc5be0 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 17 Apr 2015 13:32:29 +0200 Subject: [PATCH] Don't save unchanged user map items to the DB. --- app/controllers/import/google_code_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/import/google_code_controller.rb b/app/controllers/import/google_code_controller.rb index fb4ef98736..73c912e285 100644 --- a/app/controllers/import/google_code_controller.rb +++ b/app/controllers/import/google_code_controller.rb @@ -54,6 +54,11 @@ class Import::GoogleCodeController < Import::BaseController render "new_user_map" and return end + # This is the default, so let's not save it into the database. + user_map.reject! do |key, value| + value == Gitlab::GoogleCodeImport::Client.mask_email(key) + end + session[:google_code_user_map] = user_map flash[:notice] = "The user map has been saved. Continue by selecting the projects you want to import."