Location
docs/lab2.md, Lab 2.4 Conclusion section (lines 473-474)
Issue
The example code has two bugs:
post = get_objects_or_404(...)
post.is_public != post.is_public
get_objects_or_404 should be get_object_or_404 (singular "object")
!= is a comparison operator, not assignment. Should be = not to toggle the boolean
Suggested fix
post = get_object_or_404(...)
post.is_public = not post.is_public
Location
docs/lab2.md, Lab 2.4 Conclusion section (lines 473-474)
Issue
The example code has two bugs:
get_objects_or_404should beget_object_or_404(singular "object")!=is a comparison operator, not assignment. Should be= notto toggle the booleanSuggested fix