Skip to content

Commit 347962c

Browse files
committed
fix: send notification only when person exists
Refs: PT-1946
1 parent 55a5ef6 commit 347962c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

occurrences/notification_services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def translation(field_translation_map: object, language=None):
147147
if (
148148
NOTIFICATION_TYPE_EMAIL in notification_type
149149
and notification_template_id
150-
and person.email_address
150+
and person and person.email_address
151151
):
152152
context = {
153153
"person": person,

0 commit comments

Comments
 (0)