8000 update question/guidance crashes when customizing templates in org_admin interface · Issue #3038 · DMPRoadmap/roadmap · GitHub
[go: up one dir, main page]

Skip to content
update question/guidance crashes when customizing templates in org_admin interface #3038
@nicolasfranck

Description

@nicolasfranck

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

3.0.2, but probably also in 3.0.3

Actual behaviour:

When you try to update a question or guidance of a regular
non option based question in a published and customizable template, you'll see the following error in the
logs:

NoMethodError - undefined method `each_pair' for nil:NilClass:
  app/controllers/org_admin/questions_controller.rb:262:in `update_option_ids'
  app/controllers/org_admin/questions_controller.rb:155:in `update'

Cause of the error is that this line
calls update_option_ids, but the parameter question_options_attributes is nil.
It should probably only be called when applicable.

Steps to reproduce:

  • go to your org_admin web interface
  • customize a template
  • publish your changes
  • try to edit a question text or guidance text for a question that is NOT option based

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0