From 0905da7db870174c63bd4c3f4362d826b93c038b Mon Sep 17 00:00:00 2001 From: Eric McGarry <46828798+mcgarrye@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:42:27 -0500 Subject: [PATCH] fix: building selection criteria adjustment (#4505) 982 --- api/src/services/listing.service.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/api/src/services/listing.service.ts b/api/src/services/listing.service.ts index 462af4b15e..76d873e5d8 100644 --- a/api/src/services/listing.service.ts +++ b/api/src/services/listing.service.ts @@ -1210,20 +1210,28 @@ export class ListingService implements OnModuleInit { const newListingData: ListingCreate = { ...mappedListing, - name: dto.name, + applicationMethods: applicationMethods, assets: [], - status: ListingsStatusEnum.pending, + listingsBuildingSelectionCriteriaFile: + mappedListing.listingsBuildingSelectionCriteriaFile + ? { + fileId: + mappedListing.listingsBuildingSelectionCriteriaFile.fileId, + label: mappedListing.listingsBuildingSelectionCriteriaFile.label, + } + : undefined, listingEvents: listingEvents, + listingImages: listingImages, listingMultiselectQuestions: storedListing.listingMultiselectQuestions?.map((question) => ({ id: question.multiselectQuestionId, ordinal: question.ordinal, })), - listingImages: listingImages, - applicationMethods: applicationMethods, lotteryLastRunAt: undefined, lotteryLastPublishedAt: undefined, lotteryStatus: undefined, + name: dto.name, + status: ListingsStatusEnum.pending, }; const res = await this.create(