only send email when a note actually has content
Some checks failed
docker-image / docker (push) Has been cancelled
Some checks failed
docker-image / docker (push) Has been cancelled
This commit is contained in:
parent
4abb4d7516
commit
2da0096453
1 changed files with 21 additions and 19 deletions
|
|
@ -215,6 +215,8 @@ class HedgedocExpire:
|
|||
with db.prepare('DELETE FROM "Notes" WHERE "id" = $1') as delete_statement:
|
||||
for note in self.notes_to_be_expired(db):
|
||||
try:
|
||||
|
||||
if len(note["content"]) > 0:
|
||||
note_age = datetime.now(timezone.utc) - datetime.fromisoformat(note['updatedAt'])
|
||||
msg = MIMEMultipart()
|
||||
msg['From'] = self.email_sender.mail_from
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue