mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +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."""
|
||||
|
||||
from django.contrib.auth.mixins import PermissionRequiredMixin
|
||||
from django.http import Http404
|
||||
|
||||
from registrar.models import DomainApplication, DomainInvitation
|
||||
|
||||
|
@ -61,9 +60,10 @@ class DomainPermission(PermissionsLoginMixin):
|
|||
# that does not exist, for example,
|
||||
# https://getgov-staging.app.cloud.gov/domain/73333,
|
||||
# the page throws a 403 error, instead of a 404.
|
||||
# This fixes that behaviour, but do we want it to throw a 403 instead?
|
||||
# Basically, should this be logger.debug()?
|
||||
raise Http404()
|
||||
# Do we want it to throw a 404 instead?
|
||||
# Basically, should this be Http404()?
|
||||
logger.warning(f"Domain with PK {pk} does not exist")
|
||||
return False
|
||||
|
||||
# Analysts may manage domains, when they are in these statuses:
|
||||
valid_domain_statuses = [
|
||||
|
|
|
@ -47,8 +47,8 @@ class DomainPermissionView(DomainPermission, DetailView, abc.ABC):
|
|||
|
||||
def log_analyst_form_actions(self, form_class_name, printable_object_info):
|
||||
"""Generates a log for when key 'analyst_action' exists on the session.
|
||||
Follows this format: f"{user_type} {self.request.user}
|
||||
edited {form_class_name} in {printable_object_info}"
|
||||
Follows this format: f"{user_type} {self.request.user}
|
||||
edited {form_class_name} in {printable_object_info}"
|
||||
"""
|
||||
if "analyst_action" in self.request.session:
|
||||
action = self.request.session["analyst_action"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue