mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 04:59:59 +02:00
fixed tests and updated code formatting
This commit is contained in:
parent
6400fa5f4b
commit
d354751481
2 changed files with 6 additions and 7 deletions
|
@ -1125,7 +1125,7 @@ class TestWithDomainPermissions(TestWithUser):
|
||||||
UserDomainRole.objects.get_or_create(
|
UserDomainRole.objects.get_or_create(
|
||||||
user=self.user,
|
user=self.user,
|
||||||
domain=self.domain_multdsdata,
|
domain=self.domain_multdsdata,
|
||||||
role=UserDomainRole.Roles.ADMIN,
|
role=UserDomainRole.Roles.MANAGER,
|
||||||
)
|
)
|
||||||
UserDomainRole.objects.get_or_create(
|
UserDomainRole.objects.get_or_create(
|
||||||
user=self.user,
|
user=self.user,
|
||||||
|
|
|
@ -12,10 +12,8 @@ from django.contrib.messages.views import SuccessMessageMixin
|
||||||
from django.db import IntegrityError
|
from django.db import IntegrityError
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.template import RequestContext
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.views.generic.edit import FormMixin
|
from django.views.generic.edit import FormMixin
|
||||||
from django.shortcuts import render
|
|
||||||
|
|
||||||
from registrar.models import (
|
from registrar.models import (
|
||||||
Domain,
|
Domain,
|
||||||
|
@ -371,18 +369,19 @@ class DomainDsDataView(DomainFormBaseView):
|
||||||
formset = self.get_form()
|
formset = self.get_form()
|
||||||
override = False
|
override = False
|
||||||
|
|
||||||
# This is called by the form cancel button, and also by the modal's X and cancel buttons
|
# This is called by the form cancel button,
|
||||||
|
# and also by the modal's X and cancel buttons
|
||||||
if "btn-cancel-click" in request.POST:
|
if "btn-cancel-click" in request.POST:
|
||||||
url = self.get_success_url()
|
url = self.get_success_url()
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
# This is called by the Disable DNSSEC modal to override
|
# This is called by the Disable DNSSEC modal to override
|
||||||
if "disable-override-click" in request.POST:
|
if "disable-override-click" in request.POST:
|
||||||
override = True
|
override = True
|
||||||
|
|
||||||
# This is called when all DNSSEC data has been deleted and the
|
# This is called when all DNSSEC data has been deleted and the
|
||||||
# Save button is pressed
|
# Save button is pressed
|
||||||
if len(formset) == 0 and formset.initial != [{}] and override == False:
|
if len(formset) == 0 and formset.initial != [{}] and override is False:
|
||||||
# trigger the modal
|
# trigger the modal
|
||||||
# get context data from super() rather than self
|
# get context data from super() rather than self
|
||||||
# to preserve the context["form"]
|
# to preserve the context["form"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue