Making flake8 happy. Using get_object_or_404 for getting the resource