mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-14 21:44:08 +02:00
Linting / test
This commit is contained in:
parent
09c336c1da
commit
dc0420998b
2 changed files with 6 additions and 6 deletions
|
@ -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 = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue