Skip to content

Commit 16b0f55

Browse files
committed
fix: entry cloning
1 parent 5c5eb81 commit 16b0f55

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

apps/backend/src/research/questionnaires/questionnaires.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ export class QuestionnairesService {
2222
const prevQuestionnaire = await this.findLatestByParticipant(questionnaire.participant!.id);
2323
this.validateStartDate(questionnaire, prevQuestionnaire);
2424

25-
prevQuestionnaire?.populate(["entries.entryLanguages"]);
26-
27-
await this.questionnaireRepository.findOne({ participant: questionnaire.participant }, { orderBy: { endedAt: "desc" } });
25+
await prevQuestionnaire?.populate(["entries.entryLanguages"]);
2826

2927
const clonedEntries = prevQuestionnaire?.entries.map((entry) => {
3028
const { id: _id, entryLanguages: _entryLanguages, questionnaire: _questionnaire, ...rest } = entry.toPOJO();

0 commit comments

Comments
 (0)