Update admin.py

This commit is contained in:
zandercymatics 2024-08-15 10:34:57 -06:00
parent 52e3fb89b7
commit e92b0c5b79
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -2927,11 +2927,11 @@ class PortfolioAdmin(ListHeaderAdmin):
"portfolio_type",
]
def federal_type(self, obj: models.portfolio):
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"
federal_type.short_description = "Federal type" # type: ignore
def created_on(self, obj: models.Portfolio):
"""Returns the created_at field, with a different short description"""