Fix handling of non-object troubleshooting data - #7826
vichekaoeun wants to merge 1 commit into
Conversation
|
Should we also add a check for this to |
|
yes I think that would make sense but I think it could go into a separate function like clean_troubleshooting since it would mix unrelated issues to the wrong field otherwise. |
e4f0f63 to
ce4ca5b
Compare
|
Hi @denyshon could you review my change |
|
@vichekaoeun sure, but I'm not a part of the team, so I don't have write access to the repo and can't speak on their behalf you may want to ping @escattone instead |
| raise forms.ValidationError(_("Question content cannot be empty.")) | ||
| return content | ||
|
|
||
| def clean_troubleshooting(self): |
There was a problem hiding this comment.
just a neat: let's add a docstring for this method
|
Hi @escattone could you help review my changes? |
| return troubleshooting | ||
|
|
||
| try: | ||
| parsed = json.loads(troubleshooting) |
There was a problem hiding this comment.
This will change the current behavior and limit the troubleshooting data only to json. That works for the JS code that pulls json but it will no longer accept manually copied raw data from about:support
There was a problem hiding this comment.
doesn't copied raw data follow the json format?
ce4ca5b to
8f05ccd
Compare
Resolved bug #3116 causing 500 error when troubleshooting data contains JSON that is not an object. Added tests for non-object JSON on form