After updating front and back applications from version 1.6.4 to 2.0.0, the creation of a new entry fails.
The POST request to /pias results in a 500 Internal Server Error.
I, [2018-12-13T09:55:59.367832 #24252] INFO -- : [9c27197b-0a35-4471-a696-972937dd5f66] Started POST "/pias" for 127.0.0.1 at 2018-12-13 09:55:59 +0100
I, [2018-12-13T09:55:59.370565 #24252] INFO -- : [9c27197b-0a35-4471-a696-972937dd5f66] Processing by PiasController#create as */*
I, [2018-12-13T09:55:59.370671 #24252] INFO -- : [9c27197b-0a35-4471-a696-972937dd5f66] Parameters: {"pia"=>{"name"=>"test", "author_name"=>"test", "evaluator_name"=>"test", "validator_name"=>"test", "dpo_status"=>"undefined", "dpo_opinion"=>"undefined", "concerned_people_opinion"=>"undefined", "concerned_people_status"=>"undefined", "rejected_reason"=>"undefined", "applied_adjustements"=>"undefined", "created_at"=>"Thu Dec 13 2018 09:56:00 GMT+0100 (Central European Standard Time)", "updated_at"=>"undefined", "status"=>"0", "is_example"=>"0", "dpos_names"=>"undefined", "people_names"=>"undefined", "concerned_people_searched_opinion"=>"undefined", "concerned_people_searched_content"=>"undefined", "structure_id"=>"", "structure_name"=>"undefined", "structure_sector_name"=>"undefined", "structure_data"=>"\"\""}}
I, [2018-12-13T09:55:59.372085 #24252] INFO -- : [9c27197b-0a35-4471-a696-972937dd5f66] Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
F, [2018-12-13T09:55:59.372774 #24252] FATAL -- : [9c27197b-0a35-4471-a696-972937dd5f66]
F, [2018-12-13T09:55:59.372833 #24252] FATAL -- : [9c27197b-0a35-4471-a696-972937dd5f66] JSON::ParserError (784: unexpected token at '""'):
F, [2018-12-13T09:55:59.372869 #24252] FATAL -- : [9c27197b-0a35-4471-a696-972937dd5f66]
F, [2018-12-13T09:55:59.372905 #24252] FATAL -- : [9c27197b-0a35-4471-a696-972937dd5f66] app/controllers/pias_controller.rb:30:in `create'
-----WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[name]"
test
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[author_name]"
test
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[evaluator_name]"
test
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[validator_name]"
test
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[dpo_status]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[dpo_opinion]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[concerned_people_opinion]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[concerned_people_status]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[rejected_reason]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[applied_adjustements]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[created_at]"
Thu Dec 13 2018 09:56:00 GMT+0100 (Central European Standard Time)
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[updated_at]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[status]"
0
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[is_example]"
0
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[dpos_names]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[people_names]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[concerned_people_searched_opinion]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[concerned_people_searched_content]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[structure_id]"
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[structure_name]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[structure_sector_name]"
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[structure_data]"
""
------WebKitFormBoundaryF35LfFh31pBo4d0J--
I suspect the "" value of pia[structure_data] is not being parsed correctly.
Could you please provide some help in investigating this issue?