Model updates and cleanup of comments

This commit is contained in:
CocoByte 2024-06-17 21:20:05 -06:00
parent 2c96eebc6f
commit 42efc73722
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
5 changed files with 17 additions and 25 deletions

View file

@ -2562,9 +2562,11 @@ class PortfolioAdmin(ListHeaderAdmin):
# ]
def save_model(self, request, obj, form, change):
# ---- update creator ----
# Set the creator field to the current admin user
obj.creator = request.user if request.user.is_authenticated else None
if not obj.creator is None:
# ---- update creator ----
# Set the creator field to the current admin user
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,