removed if statement that checks if creator is None

This commit is contained in:
asaki222 2024-08-06 16:45:05 -04:00
parent 76e5b8480d
commit 046b1a8438
No known key found for this signature in database
GPG key ID: CDC41B4E3DF6857F

View file

@ -2865,11 +2865,8 @@ class PortfolioAdmin(ListHeaderAdmin):
return super().change_view(request, object_id, form_url, extra_context)
def save_model(self, request, obj, form, change):
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
obj.creator = request.user if request.user.is_authenticated else None
# ---- update organization name ----
# org name will be the same as federal agency, if it is federal,
# otherwise it will be the actual org name. If nothing is entered for