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

Editing a paused live form and adding an existing questions results in a application crash #914

Open
thinqdeliver opened this issue Jul 10, 2022 · 0 comments
Labels

Comments

@thinqdeliver
Copy link

Error message:

An ActiveRecord::RecordNotUnique occurred in forms#add_questions:

PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_form_items_on_form_id_and_question_id"
DETAIL: Key (form_id, question_id)=(d31b51ad-30ac-470c-bda5-0e0f08ecadde, 238180dc-0bff-4435-8e5f-467ce3ba70be) already exists.

app/models/form.rb:145:in `block in add_questions_to_top_level'


Backtrace:

app/models/form.rb:145:in block in add_questions_to_top_level' app/models/form.rb:141:in each'
app/models/form.rb:141:in each_with_index' app/models/form.rb:141:in add_questions_to_top_level'
app/controllers/forms_controller.rb:202:in add_questions' app/models/setting.rb:68:in with_cache'
app/controllers/concerns/application_controller/caching.rb:12:in `enable_settings_caching'

@cooperka cooperka added the bug label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants