ContentNodeSlim "popular" view can return an empty string as response
See original GitHub issueObserved behavior
Related to #5407, a request to /api/content/contentnode_slim/popular/?by_role=true&include_fields=num_coach_contents&contentCacheKey=1556915747
Is returning a 200 response with ""
on my local version, which in turn causes the problem in #5407. The other detail view (“resume” and “next_steps”) are working correctly.
In the Network inspector in chrome dev tools
I do not know what, specifically, is causing the “popular” view to return nothing.
…
Expected behavior
Assuming, this is a legitimate response to, for example, not having any “popular” resources, a call to this endpoint returns something acceptable to the Api Resource class, like []
.
User-facing consequences
Servers with the same conditions as mine (whatever they are) will not have a working “Learn > Recommended” page.
Errors and logs
…
Steps to reproduce
…
Context
0.12. develop
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top GitHub Comments
Right, either would work.
Implemented the solution above in #5486. In local development mode, the use-the-cache branch should always be bypassed, and the view returns
Response(serializer.data)
.