AssertionError editing a question
Bug #697294 reported by
Diogo Matsubara
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
j.c.sackett |
Bug Description
As seen on OOPS-1826B1089 an AssertionError: Open question shouldn't have an answerer. was raised when the user tried to edit the question.
Related branches
lp:~jcsackett/launchpad/assertion-error-697294
- Henning Eggers (community): Approve (code)
-
Diff: 258 lines (+68/-53)4 files modifiedlib/lp/answers/configure.zcml (+0/-6)
lib/lp/answers/model/question.py (+30/-5)
lib/lp/answers/model/questionreopening.py (+18/-32)
lib/lp/answers/tests/emailinterface.txt (+20/-10)
Changed in launchpad: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: questions |
Changed in launchpad: | |
importance: | High → Critical |
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | nobody → j.c.sackett (jcsackett) |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The user was trying to set the package to cups to classify the solution picked by the user. This is a legitimate case. The form does not permit the user to change status...that is a separate form with sane controls on it.
This question is open, but I also see a star on a question indicating it was solved. I see from the question history that the asker reopened the question. There are *no* answers after the reopening. Only the asker is providing more information.
Module lp.answers. browser. question, line 747, in change_action extFromData( data) browser. launchpadform, line 427, in updateContextFr omData before_ modification, field_names)) model.questionr eopening, line 67, in create_ questionreopeni ng
self.updateCont
Module lp.app.
context, context_
...
Module lp.answers.
"Open question shouldn't have an answerer.")
AssertionError: Open question shouldn't have an answerer.
The code took an unexpected path after updating the question. create_ questionreopeni ng is subscribed to objectEventNotify. The method did work when the question was reopened. It will work again once a user provides an answer. Since the status has not changed, I expect create_ questionreopeni ng to return early if there is no status change.
maybe
if old_question.status == question.status
return