diff --git a/lib/gitlab/import_export/attribute_cleaner.rb b/lib/gitlab/import_export/attribute_cleaner.rb index f476905b6dbb339de09328bb536faa82905f751f..b27a2a9fb6579c2418da45c515c6968df5d89873 100644 --- a/lib/gitlab/import_export/attribute_cleaner.rb +++ b/lib/gitlab/import_export/attribute_cleaner.rb @@ -24,14 +24,9 @@ module Gitlab private def prohibited_key?(key) - return false if allowed_reference?(key) + return false if permitted_key?(key) - return true if 'cached_markdown_version'.equal?(key) - - prohibited_suffixes = %w(_id _html) - prohibited_suffixes.any? do |suffix| - true if key.end_with?(suffix) - end + 'cached_markdown_version' == key || PROHIBITED_SUFFIXES.any? {|suffix| key.end_with?(suffix)} end def allowed_reference?(key)