fix: possibly undefined newsletter com
This commit is contained in:
parent
55d4a952c3
commit
c173f917e3
1 changed files with 5 additions and 5 deletions
|
@ -227,14 +227,14 @@ export async function getCommunicationByMemberAndRecord(req: Request, res: Respo
|
||||||
* @returns {Promise<*>}
|
* @returns {Promise<*>}
|
||||||
*/
|
*/
|
||||||
export async function createMemberPrintoutList(req: Request, res: Response): Promise<any> {
|
export async function createMemberPrintoutList(req: Request, res: Response): Promise<any> {
|
||||||
let members = await MemberService.getByRunningMembership()
|
let members = await MemberService.getByRunningMembership();
|
||||||
|
|
||||||
let pdf = await PdfExport.renderFile({
|
let pdf = await PdfExport.renderFile({
|
||||||
title: "Mitgliederliste",
|
title: "Mitgliederliste",
|
||||||
template: "member.list",
|
template: "member.list",
|
||||||
saveToDisk: false,
|
saveToDisk: false,
|
||||||
data: {
|
data: {
|
||||||
member: members
|
member: members,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -596,7 +596,7 @@ export async function updateCommunicationOfMember(req: Request, res: Response):
|
||||||
communicationId: recordId,
|
communicationId: recordId,
|
||||||
};
|
};
|
||||||
await MemberCommandHandler.updateNewsletter(updateNewsletter);
|
await MemberCommandHandler.updateNewsletter(updateNewsletter);
|
||||||
} else if (currentUserNewsletterMain.sendNewsletter.id == recordId) {
|
} else if (currentUserNewsletterMain.sendNewsletter?.id == recordId) {
|
||||||
await MemberCommandHandler.unsetNewsletter(memberId);
|
await MemberCommandHandler.unsetNewsletter(memberId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue