Commit 4fd99e67 authored by Piotr Skorupa's avatar Piotr Skorupa Committed by Nikola Milojevic

Add converting definition data categories to lowercase

parent 63cbe267
......@@ -55,6 +55,10 @@ module Gitlab
end
end
def category_to_lowercase
attributes[:data_category]&.downcase!
end
alias_method :to_dictionary, :to_h
class << self
......@@ -96,7 +100,7 @@ module Gitlab
definition = YAML.safe_load(definition)
definition.deep_symbolize_keys!
self.new(path, definition).tap(&:validate!)
self.new(path, definition).tap(&:validate!).tap(&:category_to_lowercase)
rescue StandardError => e
Gitlab::ErrorTracking.track_and_raise_for_dev_exception(InvalidError.new(e.message))
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