Skip to content

Commit 7992c5b

Browse files
authored
fix(classes): fix undefined id in congregation when saving backup
1 parent d7c747e commit 7992c5b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/classes/Congregation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class Congregation {
8787
},
8888
};
8989

90-
await db.collection("congregations").doc(id).set(data, { merge: true });
90+
await db.collection("congregations").doc(this.id).set(data, { merge: true });
9191

9292
this.cong_persons = encryptedPersons;
9393
this.cong_schedule_draft = cong_schedule;

src/classes/User.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ export class User {
344344
await db.collection("users").doc(this.id).update({ "congregation.devices": updatedDevices });
345345

346346
await this.loadDetails();
347+
348+
await Congregations.loadAll();
347349
};
348350

349351
updateSessionsInfo = async (visitorId) => {
@@ -358,5 +360,7 @@ export class User {
358360
await db.collection("users").doc(this.id).update({ "about.sessions": newSessions });
359361

360362
this.sessions = newSessions;
363+
364+
await Congregations.loadAll();
361365
};
362366
}

0 commit comments

Comments
 (0)