noosfero | Fixes empty submission on Custom Forms (!1617)

Matheus Richard gitlab at mg.gitlab.com
Mon Oct 8 11:28:10 BRT 2018


Matheus Richard commented on a discussion on plugins/custom_forms/lib/custom_forms_plugin/csv_handler.rb:

>        end
>        answer
>      else
> -      CustomFormsPlugin::Answer.create!(field: field, value: value, imported: true)

With the exclamation mark an answer without value will raise an exception and crashes the page. Without the mark, validation errors are added to the submission and presented to the user. That's why we removed it.

We should add a `begin/catch` block on `submission_from_row`  instead to accomplish this?

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1617#note_107240109
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20181008/4052c7c0/attachment.html>


More information about the Noosfero-dev mailing list