Skip to content

Conversation

@danni-stark
Copy link
Contributor

closes https://github.com/vanilla/support/issues/1699

Details

Making an api/v2/discussions call When a Discussion of Type question and QnA Null would fail with this error

"message": "Validation Failed",

"status": 422,

"errors": [

    {

        "field": "status",

        "code": "missingField",

        "path": "[22].attributes.question",

        "status": 422,

        "message": "item[22].attributes.question.status is required."

    }

]

This is happening because of https://github.com/vanilla/addons/blob/master/plugins/QnA/class.qna.plugin.php#L1320
w'ere not setting a default value when that field is null.

danni-stark and others added 2 commits April 15, 2020 07:53
Co-Authored-By: Todd Burry <todd@vanillaforums.com>
@danni-stark danni-stark requested a review from tburry April 15, 2020 12:46
@tburry tburry merged commit 46ee7d1 into master Apr 15, 2020
@tburry tburry deleted the fix/qna-api branch April 15, 2020 13:02
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

Successfully merging this pull request may close these issues.

3 participants