Commit ce6dab45 authored by 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
parents 4ca4b22e cb9dfaa8
...@@ -44,8 +44,8 @@ module ConfigurationHelper ...@@ -44,8 +44,8 @@ module ConfigurationHelper
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment