Merge commit '3987b9fd624010eeeaeb7cad96606b05aa813f6a' into glitch-soc/stable-4.7
This commit is contained in:
commit
f8df1997cc
21 files changed
+102
-22
No files matched your search
@@ -202,8 +202,10 @@ class Form::Import
|
||||
end
|
||||
|
||||
def validate_json_data
|
||||
return errors.add(:data, I18n.t('imports.errors.incompatible_type')) unless allowed_type_for_json?
|
||||
return errors.add(:data, I18n.t('imports.errors.no_data')) if json_data.empty?
|
||||
|
||||
errors.add(:data, I18n.t('imports.errors.over_rows_processing_limit', count: ROWS_PROCESSING_LIMIT)) if json_data.count > ROWS_PROCESSING_LIMIT
|
||||
errors.add(:data, I18n.t('imports.errors.incompatible_type')) unless allowed_type_for_json?
|
||||
end
|
||||
|
||||
def content_type_is_json?
|
||||
@@ -211,7 +213,10 @@ class Form::Import
|
||||
end
|
||||
|
||||
def json_data
|
||||
parse_json['custom_filters'].map(&:deep_symbolize_keys)
|
||||
case type.to_sym
|
||||
when :custom_filters
|
||||
parse_json['custom_filters'].map(&:deep_symbolize_keys)
|
||||
end
|
||||
end
|
||||
|
||||
def parse_json
|
||||
|
||||
Reference in new issue
Block a user