mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 10:07:04 +02:00
linted
This commit is contained in:
parent
1f2d63070d
commit
46c2326933
3 changed files with 3 additions and 3 deletions
|
@ -2563,7 +2563,7 @@ class PortfolioAdmin(ListHeaderAdmin):
|
|||
|
||||
def save_model(self, request, obj, form, change):
|
||||
|
||||
if not obj.creator is None:
|
||||
if obj.creator is not None:
|
||||
# ---- update creator ----
|
||||
# Set the creator field to the current admin user
|
||||
obj.creator = request.user if request.user.is_authenticated else None
|
||||
|
|
|
@ -234,4 +234,4 @@ class FederalAgency(TimeStampedModel):
|
|||
@classmethod
|
||||
def get_non_federal_agency(cls):
|
||||
"""Returns the non-federal agency."""
|
||||
return FederalAgency.objects.filter(agency="Non-Federal Agency").first()
|
||||
return FederalAgency.objects.filter(agency="Non-Federal Agency").first()
|
||||
|
|
|
@ -20,7 +20,7 @@ class Portfolio(TimeStampedModel):
|
|||
# use the short names in Django admin
|
||||
OrganizationChoices = DomainRequest.OrganizationChoices
|
||||
StateTerritoryChoices = DomainRequest.StateTerritoryChoices
|
||||
|
||||
|
||||
# Stores who created this model. If no creator is specified in DJA,
|
||||
# then the creator will default to the current request user"""
|
||||
creator = models.ForeignKey("registrar.User", on_delete=models.PROTECT, help_text="Associated user", unique=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue