Skip to content

Commit 3750f7d

Browse files
committed
Fix links in email notifications, issue 2356
1 parent 8ad4c8b commit 3750f7d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/management/commands/index_and_notify.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ def get_resource_uri(self, record, rtype):
240240
) # Very rare – giving a non-existent | manually created surge – no event
241241
resource_uri = "%s/emergencies/%s" % (settings.FRONTEND_URL, belonging_event)
242242
elif rtype == RecordType.SURGE_DEPLOYMENT_MESSAGES:
243-
resource_uri = "%s/%s" % (settings.FRONTEND_URL, "deployments") # can be further sophisticated
243+
resource_uri = "%s/%s" % (settings.FRONTEND_URL, "surge/overview") # could be further sophisticated:
244+
# e.g. emergencies/6700/surge, where 6700 is the related emergency ID
244245
elif rtype == RecordType.APPEAL and (record.event is not None and not record.needs_confirmation):
245246
# Appeals with confirmed emergencies link to that emergency
246247
resource_uri = "%s/emergencies/%s" % (settings.FRONTEND_URL, record.event.id)
@@ -249,7 +250,7 @@ def get_resource_uri(self, record, rtype):
249250
resource_uri = "%s/%s/%s" % (
250251
settings.FRONTEND_URL,
251252
# this else never occurs, see ¤
252-
"emergencies" if rtype == RecordType.EVENT or rtype == RecordType.FOLLOWED_EVENT else "reports",
253+
"emergencies" if rtype == RecordType.EVENT or rtype == RecordType.FOLLOWED_EVENT else "field-reports",
253254
record.id,
254255
)
255256
return resource_uri

0 commit comments

Comments
 (0)