You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a Python wrapper for the API and I've noticed that the pinned field doesn't behave as expected when creating or updating a discussion topic. I have to explicitly send pinned as a lowercase "true" in my request, whereas every other endpoint I've covered evaluates to a boolean correctly no matter what the case is.
Steps to reproduce:
Send a POST request to /api/v1/courses/:course_id/discussion_topics containing the data published=True&pinned=True.
Notice that the topic is published successfully, but remains unpinned.
process_pin_parameters should operate consistently with the rest of the API. In particular, "True" should be evaluated as true and "False" should be evaluated as false.
I've already pushed up a fix internally, and it's been code reviewed, but not QA'd yet. Hopefully that happens in the next day or two, and this will make it into the 6/25 release.
Summary:
I'm developing a Python wrapper for the API and I've noticed that the
pinned
field doesn't behave as expected when creating or updating a discussion topic. I have to explicitly sendpinned
as a lowercase "true" in my request, whereas every other endpoint I've covered evaluates to a boolean correctly no matter what the case is.Steps to reproduce:
/api/v1/courses/:course_id/discussion_topics
containing the datapublished=True&pinned=True
.Request:
Response:
Expected behavior:
process_pin_parameters should operate consistently with the rest of the API. In particular,
"True"
should be evaluated astrue
and"False"
should be evaluated asfalse
.Additional notes:
It seems
value_to_boolean()
could be used as it is in process_published_parameters to solve the problem.The text was updated successfully, but these errors were encountered: