From 0673c76d077a27ccd48d7abefbe6a6c0a6b6e2d2 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 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(