Skip to content

Commit cf203ed

Browse files
committed
Fix Surge Alert error 500 when no linked event
1 parent 2939d72 commit cf203ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

notifications/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@ def save(self, *args, **kwargs):
6969
def __str__(self):
7070
if self.operation and self.operation != '':
7171
return self.operation
72-
else:
72+
elif self.event:
7373
return self.event.name
74+
elif self.message:
75+
return self.message
76+
else:
77+
return '–'
7478

7579

7680
class SubscriptionType(models.IntegerChoices):

0 commit comments

Comments
 (0)