mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 10:16:13 +02:00
linting
This commit is contained in:
parent
cc1dd66553
commit
52e3fb89b7
3 changed files with 4 additions and 5 deletions
|
@ -9,8 +9,6 @@ from django.db.models.functions import Concat, Coalesce
|
|||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import redirect
|
||||
from django_fsm import get_available_FIELD_transitions, FSMField
|
||||
from registrar.models.domain_group import DomainGroup
|
||||
from registrar.models.suborganization import Suborganization
|
||||
from registrar.models.utility.portfolio_helper import UserPortfolioPermissionChoices, UserPortfolioRoleChoices
|
||||
from waffle.decorators import flag_is_active
|
||||
from django.contrib import admin, messages
|
||||
|
@ -2932,7 +2930,7 @@ class PortfolioAdmin(ListHeaderAdmin):
|
|||
def federal_type(self, obj: models.portfolio):
|
||||
"""Returns the federal_type field"""
|
||||
return BranchChoices.get_branch_label(obj.federal_type) if obj.federal_type else "-"
|
||||
|
||||
|
||||
federal_type.short_description = "Federal type"
|
||||
|
||||
def created_on(self, obj: models.Portfolio):
|
||||
|
|
|
@ -137,7 +137,7 @@ class Portfolio(TimeStampedModel):
|
|||
return " - ".join([org_type_label, agency_type_label])
|
||||
else:
|
||||
return org_type_label
|
||||
|
||||
|
||||
@property
|
||||
def federal_type(self):
|
||||
"""Returns the federal_type value on the underlying federal_agency field"""
|
||||
|
|
|
@ -160,6 +160,7 @@ def and_filter(value, arg):
|
|||
"""
|
||||
return bool(value and arg)
|
||||
|
||||
|
||||
@register.filter(name="has_contact_info")
|
||||
def has_contact_info(user):
|
||||
"""Checks if the given object has the attributes: title, email, phone
|
||||
|
@ -167,4 +168,4 @@ def has_contact_info(user):
|
|||
if not hasattr(user, "title") or not hasattr(user, "email") or not hasattr(user, "phone"):
|
||||
return False
|
||||
else:
|
||||
return bool(user.title or user.email or user.phone)
|
||||
return bool(user.title or user.email or user.phone)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue