Skip to content

Commit 54afcbb

Browse files
Merge pull request #1643 from IFRCGo/hotfix/surgealert-error-500
Hotfix/surgealert error 500
2 parents 2939d72 + 88a5d17 commit 54afcbb

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## Unreleased
88

9+
## 1.1.468
10+
11+
### Added
12+
- Fix Surge Alert error 500 when no linked event
13+
914
## 1.1.467
1015

1116
### Added
@@ -2138,7 +2143,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
21382143

21392144
## 0.1.20
21402145

2141-
[Unreleased]: https://github.com/IFRCGo/go-api/compare/1.1.467...HEAD
2146+
[Unreleased]: https://github.com/IFRCGo/go-api/compare/1.1.468...HEAD
2147+
[1.1.468]: https://github.com/IFRCGo/go-api/compare/1.1.467...1.1.468
21422148
[1.1.467]: https://github.com/IFRCGo/go-api/compare/1.1.466...1.1.467
21432149
[1.1.466]: https://github.com/IFRCGo/go-api/compare/1.1.465...1.1.466
21442150
[1.1.465]: https://github.com/IFRCGo/go-api/compare/1.1.464...1.1.465

main/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from .celery import app as celery_app
44

55
__all__ = ['celery_app']
6-
__version__ = '1.1.467'
6+
__version__ = '1.1.468'

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)