summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-01-30 14:26:05 +0100
committerJames Lopez <james@jameslopez.es>2017-01-30 14:26:32 +0100
commit017a5068f60c0a7fb058422c5d8d2740f36084a4 (patch)
tree29af6ba8fa9bac7570e90f5e85fa0160107f4e75
parentbd6b13c620f1f6447715240fe6c6b865ef7336f0 (diff)
downloadgitlab-ce-fix/import-encrypt-atts.tar.gz
fix spec failurefix/import-encrypt-atts
-rw-r--r--lib/gitlab/import_export/relation_factory.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb
index dd7f9e2fd65..0319d7707a8 100644
--- a/lib/gitlab/import_export/relation_factory.rb
+++ b/lib/gitlab/import_export/relation_factory.rb
@@ -154,7 +154,7 @@ module Gitlab
end
def remove_encrypted_attributes!
- return if relation_class.encrypted_attributes.empty?
+ return unless relation_class.respond_to?(:encrypted_attributes) && relation_class.encrypted_attributes.any?
relation_class.encrypted_attributes.each_key do |key|
@relation_hash[key.to_s] = nil