Skip to content

Commit

Permalink
fixed node delete
Browse files Browse the repository at this point in the history
  • Loading branch information
SteRiccio committed Oct 2, 2023
1 parent c91ae44 commit 274a4f8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class RecordsUpdateThread extends Thread {
async getOrFetchSurveyData(msg) {
const { surveyId, cycle, draft } = msg

const key = this.getSurveyDataKey({ surveyId, cycle, draft })
const key = this.getSurveyDataKey(msg)

let data = this.surveyDataByKey[key]
if (data) {
Expand Down Expand Up @@ -209,10 +209,9 @@ class RecordsUpdateThread extends Thread {
async processRecordNodeDeleteMsg(msg) {
const { nodeUuid, recordUuid, user } = msg

const surveyKey = this.getSurveyDataKey(msg)
const { survey, recordsByUuid } = await this.getOrFetchSurveyData(msg)

let record = await this.getOrFetchRecord({ surveyKey, recordUuid })
let record = await this.getOrFetchRecord({ msg, recordUuid })
record = await RecordManager.deleteNode(
user,
survey,
Expand Down

0 comments on commit 274a4f8

Please sign in to comment.