Linting / test

This commit is contained in:
zandercymatics 2023-08-24 12:58:08 -06:00
parent 09c336c1da
commit dc0420998b
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 6 additions and 6 deletions

View file

@ -1,7 +1,6 @@
"""Permissions-related mixin classes.""" """Permissions-related mixin classes."""
from django.contrib.auth.mixins import PermissionRequiredMixin from django.contrib.auth.mixins import PermissionRequiredMixin
from django.http import Http404
from registrar.models import DomainApplication, DomainInvitation from registrar.models import DomainApplication, DomainInvitation
@ -61,9 +60,10 @@ class DomainPermission(PermissionsLoginMixin):
# that does not exist, for example, # that does not exist, for example,
# https://getgov-staging.app.cloud.gov/domain/73333, # https://getgov-staging.app.cloud.gov/domain/73333,
# the page throws a 403 error, instead of a 404. # the page throws a 403 error, instead of a 404.
# This fixes that behaviour, but do we want it to throw a 403 instead? # Do we want it to throw a 404 instead?
# Basically, should this be logger.debug()? # Basically, should this be Http404()?
raise Http404() logger.warning(f"Domain with PK {pk} does not exist")
return False
# Analysts may manage domains, when they are in these statuses: # Analysts may manage domains, when they are in these statuses:
valid_domain_statuses = [ valid_domain_statuses = [