openpoke / decidim-module-reporting-proposals

A new component for Decidim based on Proposals focus on reporting geolocated actuations in a city
GNU Affero General Public License v3.0
6 stars 5 forks source link

Error 500 on answering a proposal without status #34

Closed microstudi closed 1 year ago

microstudi commented 1 year ago

Answering a proposal without selecting a status leeds to a server error instead of a error indication within decidim.

Error log:

6236 #24] FATAL -- : [2b891305-2241-4f85-b366-be73fbccf85d]   
2023-01-11T16:31:03.746597007Z [2b891305-2241-4f85-b366-be73fbccf85d] ActionView::Template::Error (First argument in form cannot contain nil or be empty):
2023-01-11T16:31:03.746600363Z [2b891305-2241-4f85-b366-be73fbccf85d]     1: <%= decidim_form_for(@photo_form, url: decidim_admin_reporting_proposals.add_photos_path(id: proposal.id),
2023-01-11T16:31:03.746603549Z [2b891305-2241-4f85-b366-be73fbccf85d]     2:                      method: :post,
2023-01-11T16:31:03.746607376Z [2b891305-2241-4f85-b366-be73fbccf85d]     3:                      html: { multipart: true, class: "form edit_proposal proposal_form_admin" }) do |f| %>
2023-01-11T16:31:03.746629428Z [2b891305-2241-4f85-b366-be73fbccf85d]     4:   <div class="row column gallery__container">
2023-01-11T16:31:03.746633255Z [2b891305-2241-4f85-b366-be73fbccf85d]   
2023-01-11T16:31:03.746636169Z [2b891305-2241-4f85-b366-be73fbccf85d] actionview (6.0.6) lib/action_view/helpers/form_helper.rb:440:in `form_for'

Steps to reproduce:

  1. Go to Reporting proposal component
  2. Go to an specific proposal
  3. Give a text answer without status and "Answer" imatge
  4. See error imatge