summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/json_hash_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/import_export/json_hash_builder.rb')
-rw-r--r--lib/gitlab/import_export/json_hash_builder.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/json_hash_builder.rb b/lib/gitlab/import_export/json_hash_builder.rb
index 48c09dafcb6..b48f63bcd7e 100644
--- a/lib/gitlab/import_export/json_hash_builder.rb
+++ b/lib/gitlab/import_export/json_hash_builder.rb
@@ -83,7 +83,9 @@ module Gitlab
# +value+ existing model to be included in the hash
# +json_config_hash+ the original hash containing the root model
def add_model_value(current_key, value, json_config_hash)
- @attributes_finder.parse(value) { |hash| value = { value => hash } }
+ @attributes_finder.parse(value) do |hash|
+ value = { value => hash } unless value.is_a?(Hash)
+ end
add_to_array(current_key, json_config_hash, value)
end