no validation if tabular export template

Co-authored-by: mfo <mfo@users.noreply.github.com>
This commit is contained in:
Christophe Robillard 2024-10-25 14:58:12 +02:00 committed by mfo
parent ffd1a15d91
commit 6d074abc3f
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC

View file

@ -2,6 +2,8 @@
class ExportTemplateValidator < ActiveModel::Validator class ExportTemplateValidator < ActiveModel::Validator
def validate(export_template) def validate(export_template)
return if !export_template.template_zip?
validate_all_templates(export_template) validate_all_templates(export_template)
return if export_template.errors.any? # no need to continue if the templates are invalid return if export_template.errors.any? # no need to continue if the templates are invalid