*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit e9e377c2 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Log warning and abort if no publication email recipient can be determined

parent 8f5fb669
1 merge request!77Refactor layout and add tests
......@@ -204,6 +204,11 @@ def send_publication_notification_email(recid: str, user_id: Optional[str] = Non
owner = record._obj.parent.access.owner
if owner is not None and owner.owner_type == "user":
user = owner.resolve()
else:
current_app.logger.warn(
f"Couldn't find owner of record '{recid}' for sending email!"
)
return
html_message = render_template(
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment