fix: 조사매물 수정 로직 수정

- 수정 시 srlNo 변경되는 오류 수정
This commit is contained in:
Dayoung 2025-07-25 18:13:54 +09:00
parent 37aa91392a
commit f2f60d7c64

View File

@ -313,7 +313,7 @@ export class SurveySalesService {
*/
async updateSurvey(id: number, survey: SurveyRegistRequest, isTemporary: boolean, storeId: string, role: string) {
const { detailInfo, ...basicInfo } = survey
const newSrlNo = isTemporary ? survey.srlNo ?? '一時保存' : await this.getNewSrlNo(storeId, role)
const newSrlNo = isTemporary ? '一時保存' : survey.srlNo === '一時保存' ? await this.getNewSrlNo(storeId, role) : survey.srlNo
// @ts-ignore
return (await prisma.SD_SURVEY_SALES_BASIC_INFO.update({