Skip to content
代码片段 群组 项目
提交 ce6dab45 编辑于 作者: Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
浏览文件

Merge branch 'replace-odd-json-method' into 'master'

Replace odd JSON usage with standard parser

See merge request gitlab-org/gitlab!29701
No related branches found
No related tags found
无相关合并请求
...@@ -44,8 +44,8 @@ def parsed_attributes(relation_name, attributes, config: Gitlab::ImportExport.co ...@@ -44,8 +44,8 @@ def parsed_attributes(relation_name, attributes, config: Gitlab::ImportExport.co
import_export_config = config_hash(config) import_export_config = config_hash(config)
excluded_attributes = import_export_config[:excluded_attributes][relation_name.to_sym] excluded_attributes = import_export_config[:excluded_attributes][relation_name.to_sym]
included_attributes = import_export_config[:included_attributes][relation_name.to_sym] included_attributes = import_export_config[:included_attributes][relation_name.to_sym]
attributes = attributes - JSON[excluded_attributes.to_json] if excluded_attributes attributes = attributes - JSON.parse(excluded_attributes.to_json) if excluded_attributes
attributes = attributes & JSON[included_attributes.to_json] if included_attributes attributes = attributes & JSON.parse(included_attributes.to_json) if included_attributes
attributes attributes
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册