mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 18:39:21 +02:00
formatted for linter
This commit is contained in:
parent
fef606c1dc
commit
bbceee1dc0
6 changed files with 13 additions and 15 deletions
|
@ -6,6 +6,7 @@ from django.core.validators import MaxLengthValidator
|
|||
from phonenumber_field.widgets import RegionalPhoneNumberWidget
|
||||
from registrar.models.utility.domain_helper import DomainHelper
|
||||
|
||||
|
||||
class UserProfileForm(forms.ModelForm):
|
||||
"""Form for updating user profile."""
|
||||
|
||||
|
@ -57,4 +58,3 @@ class UserProfileForm(forms.ModelForm):
|
|||
self.domainInfo = None
|
||||
|
||||
DomainHelper.disable_field(self.fields["email"], disable_required=True)
|
||||
|
|
@ -394,7 +394,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
|||
"is_federal": self.domain_request.is_federal(),
|
||||
"modal_button": modal_button,
|
||||
"modal_heading": modal_heading,
|
||||
"has_profile_feature_flag": flag_is_active(self.request, "profile_feature")
|
||||
"has_profile_feature_flag": flag_is_active(self.request, "profile_feature"),
|
||||
}
|
||||
|
||||
def get_step_list(self) -> list:
|
||||
|
|
|
@ -9,7 +9,6 @@ from django.views.generic.edit import FormMixin
|
|||
from registrar.forms.user_profile import UserProfileForm
|
||||
from django.urls import reverse
|
||||
from registrar.models import (
|
||||
User,
|
||||
Contact,
|
||||
)
|
||||
from registrar.views.utility.permission_views import UserProfilePermissionView
|
||||
|
@ -69,6 +68,6 @@ class UserProfileView(UserProfilePermissionView, FormMixin):
|
|||
def get_object(self, queryset=None):
|
||||
"""Override get_object to return the logged-in user's contact"""
|
||||
user = self.request.user # get the logged in user
|
||||
if hasattr(user, 'contact'): # Check if the user has a contact instance
|
||||
if hasattr(user, "contact"): # Check if the user has a contact instance
|
||||
return user.contact
|
||||
return None
|
|
@ -2,9 +2,8 @@
|
|||
|
||||
import abc # abstract base class
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.views.generic import DetailView, DeleteView, TemplateView
|
||||
from registrar.models import Domain, DomainRequest, DomainInvitation, User
|
||||
from registrar.models import Domain, DomainRequest, DomainInvitation
|
||||
from registrar.models.contact import Contact
|
||||
from registrar.models.user_domain_role import UserDomainRole
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue