From e7deb34c9c8b42773143997e5129290b28bda151 Mon Sep 17 00:00:00 2001 From: aloftus23 Date: Thu, 5 Dec 2024 14:04:58 -0500 Subject: [PATCH] Fix createdBy return in organization update --- .../src/xfd_django/xfd_api/api_methods/organization.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/src/xfd_django/xfd_api/api_methods/organization.py b/backend/src/xfd_django/xfd_api/api_methods/organization.py index 63b8ae3a..dbdb64dd 100644 --- a/backend/src/xfd_django/xfd_api/api_methods/organization.py +++ b/backend/src/xfd_django/xfd_api/api_methods/organization.py @@ -528,7 +528,9 @@ def upsert_organization(organization_data, current_user): "firstName": organization.createdBy.firstName, "lastName": organization.createdBy.lastName, "email": organization.createdBy.email, - }, + } + if organization.createdBy + else None, "tags": [ { "id": str(tag.id), @@ -634,7 +636,9 @@ def update_organization(organization_id: str, organization_data, current_user): "firstName": organization.createdBy.firstName, "lastName": organization.createdBy.lastName, "email": organization.createdBy.email, - }, + } + if organization.createdBy + else None, "tags": [ { "id": str(tag.id),