Fix add_to_group and file type validation
Dieser Commit ist enthalten in:
Ursprung
d74831aa06
Commit
c8a5fe09cd
2 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
|
@ -138,7 +138,7 @@ class CustomWizard::Action
|
|||
|
||||
def add_to_group
|
||||
groups = CustomWizard::Mapper.new(
|
||||
inputs: action['inputs'],
|
||||
inputs: action['group'],
|
||||
data: data,
|
||||
user: user,
|
||||
opts: {
|
||||
|
|
|
@ -305,7 +305,7 @@ class CustomWizard::Builder
|
|||
updater.fields[id] = standardise_boolean(value)
|
||||
end
|
||||
|
||||
if type === 'upload' && !validate_file_type(value, file_types)
|
||||
if type === 'upload' && value.present? && !validate_file_type(value, file_types)
|
||||
updater.errors.add(id, I18n.t('wizard.field.invalid_file', label: label, types: file_types))
|
||||
end
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren