Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update question/guidance crashes when customizing templates in org_admin interface #3038

Closed
nicolasfranck opened this issue Sep 28, 2021 · 1 comment

Comments

@nicolasfranck
Copy link
Contributor

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
@pherterich
Copy link

As this is addressed in the latest release, can we close the issue here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants