Skip to content

Commit

Permalink
Org: Also avoids sending a notification for unpublished entries
Browse files Browse the repository at this point in the history
TYPE: Bugfix
LINK: OGC-1806
  • Loading branch information
Daverball committed Sep 11, 2024
1 parent fb931d3 commit 291df80
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/onegov/org/views/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,15 @@ def handle_new_directory_entry(
transaction.abort()
return request.redirect(request.link(self))

# FIXME: if this entry is not yet published we will need to send
# a notification using some kind of cronjob, but we need
# to take care to only send it once, so we probably need
# to add a marker to entries to indicate that notifications
# have already been sent.
if self.directory.enable_update_notifications and entry.access in (
'public',
'mtan'
):
) and entry.published:
title = request.translate(_(
'${org}: New Entry in "${directory}"',
mapping={'org': request.app.org.title,
Expand Down

0 comments on commit 291df80

Please sign in to comment.