Add type ignore

This commit is contained in:
zandercymatics 2024-08-14 12:08:21 -06:00
parent a847b07ef7
commit 21ee9ad3d8
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -2908,13 +2908,13 @@ class PortfolioAdmin(ListHeaderAdmin):
# Format: Dec 12, 2024 # Format: Dec 12, 2024
return obj.created_at.strftime("%b %d, %Y") if obj.created_at else "-" return obj.created_at.strftime("%b %d, %Y") if obj.created_at else "-"
created_on.short_description = "Created on" created_on.short_description = "Created on" # type: ignore
def portfolio_type(self, obj: models.Portfolio): def portfolio_type(self, obj: models.Portfolio):
"""Returns the portfolio type, or "-" if the result is empty""" """Returns the portfolio type, or "-" if the result is empty"""
return obj.portfolio_type if obj.portfolio_type else "-" return obj.portfolio_type if obj.portfolio_type else "-"
portfolio_type.short_description = "Portfolio type" portfolio_type.short_description = "Portfolio type" # type: ignore
def suborganizations(self, obj: models.Portfolio): def suborganizations(self, obj: models.Portfolio):
"""Returns a comma seperated list of links for each related suborg""" """Returns a comma seperated list of links for each related suborg"""
@ -2922,7 +2922,7 @@ class PortfolioAdmin(ListHeaderAdmin):
sep = '<div class="display-block margin-top-1"></div>' sep = '<div class="display-block margin-top-1"></div>'
return self.get_field_links_as_csv(queryset, "suborganization", seperator=sep) return self.get_field_links_as_csv(queryset, "suborganization", seperator=sep)
suborganizations.short_description = "Suborganizations" suborganizations.short_description = "Suborganizations" # type: ignore
def domains(self, obj: models.Portfolio): def domains(self, obj: models.Portfolio):
"""Returns a comma seperated list of links for each related domain""" """Returns a comma seperated list of links for each related domain"""
@ -2932,7 +2932,7 @@ class PortfolioAdmin(ListHeaderAdmin):
queryset, "domaininformation", link_info_attribute="get_state_display_of_domain", seperator=sep queryset, "domaininformation", link_info_attribute="get_state_display_of_domain", seperator=sep
) )
domains.short_description = "Domains" domains.short_description = "Domains" # type: ignore
def domain_requests(self, obj: models.Portfolio): def domain_requests(self, obj: models.Portfolio):
"""Returns a comma seperated list of links for each related domain request""" """Returns a comma seperated list of links for each related domain request"""
@ -2942,7 +2942,7 @@ class PortfolioAdmin(ListHeaderAdmin):
queryset, "domainrequest", link_info_attribute="get_status_display", seperator=sep queryset, "domainrequest", link_info_attribute="get_status_display", seperator=sep
) )
domain_requests.short_description = "Domain requests" domain_requests.short_description = "Domain requests" # type: ignore
# Creates select2 fields (with search bars) # Creates select2 fields (with search bars)
autocomplete_fields = [ autocomplete_fields = [