Skip to content

Commit

Permalink
Fix initial automatic email stage bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignas-rgb committed Dec 19, 2024
1 parent 67cd06a commit 58b40c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/repositories/reports/report.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class ReportRepository {
}
const reports = await this.reportModel.find().exec();
const reportCount = reports.length;
if(reports != null) {
if(reports != null && !createReport.automaticEmailsEnabled) {
await this.postmarkService.sendReceivedReportEmail(createReport.email, this.postmarkService.generateReportUrl(reportCount + 1));
}
const newReport = new this.reportModel({
Expand Down

0 comments on commit 58b40c2

Please sign in to comment.