From 7cdb90e3f3fd76934d96e1e28a7f9e2028f776e1 Mon Sep 17 00:00:00 2001 From: Eric McGarry <46828798+mcgarrye@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:14:43 -0500 Subject: [PATCH] fix: building selection criteria adjustment (#4505) (#822) 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 d717e4831a..4143b7e46c 100644 --- a/api/src/services/listing.service.ts +++ b/api/src/services/listing.service.ts @@ -1022,20 +1022,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(