Skip to content

Commit 321115c

Browse files
committed
fix: add person to contacts only when it exists
Refs: PT-1946
1 parent 55a5ef6 commit 321115c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

occurrences/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,10 @@ def set_status(self, status):
10381038
self.save()
10391039

10401040
def get_contact_people(self) -> List[Person]:
1041-
contact_people = [self.person]
1041+
if self.person is None:
1042+
contact_people = []
1043+
else:
1044+
contact_people = [self.person]
10421045
if self.person != self.study_group.person:
10431046
contact_people.append(self.study_group.person)
10441047
return contact_people

0 commit comments

Comments
 (0)