Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Added error handling in Subnet admin change view #142

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented Aug 16, 2022

Bug:
Accessing admin change view of a non-existent subnet object
resulted in Server Error 500 because the "DoesNotExist"
conditioned was not handled.

Bug:
Accessing admin change view of a non-existent subnet object
resulted in Server Error 500 because the "DoesNotExist"
conditioned was not handled.
instance = Subnet.objects.get(pk=object_id)
instance = self.get_object(request, object_id)
if instance is None:
return self._get_obj_does_not_exist_redirect(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return self._get_obj_does_not_exist_redirect(
# the following is an internal django admin method
return self._get_obj_does_not_exist_redirect(

@nemesifier nemesifier merged commit 16f22b3 into master Aug 16, 2022
@nemesifier nemesifier deleted the fix-admin-404 branch August 16, 2022 15:49
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.

None yet

2 participants