Skip to content

Commit

Permalink
Fix links in email notifications, issue 2356
Browse files Browse the repository at this point in the history
  • Loading branch information
szabozoltan69 committed Jan 6, 2025
1 parent 8ad4c8b commit 3750f7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/management/commands/index_and_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ def get_resource_uri(self, record, rtype):
) # Very rare – giving a non-existent | manually created surge – no event
resource_uri = "%s/emergencies/%s" % (settings.FRONTEND_URL, belonging_event)
elif rtype == RecordType.SURGE_DEPLOYMENT_MESSAGES:
resource_uri = "%s/%s" % (settings.FRONTEND_URL, "deployments") # can be further sophisticated
resource_uri = "%s/%s" % (settings.FRONTEND_URL, "surge/overview") # could be further sophisticated:
# e.g. emergencies/6700/surge, where 6700 is the related emergency ID
elif rtype == RecordType.APPEAL and (record.event is not None and not record.needs_confirmation):
# Appeals with confirmed emergencies link to that emergency
resource_uri = "%s/emergencies/%s" % (settings.FRONTEND_URL, record.event.id)
Expand All @@ -249,7 +250,7 @@ def get_resource_uri(self, record, rtype):
resource_uri = "%s/%s/%s" % (
settings.FRONTEND_URL,
# this else never occurs, see ¤
"emergencies" if rtype == RecordType.EVENT or rtype == RecordType.FOLLOWED_EVENT else "reports",
"emergencies" if rtype == RecordType.EVENT or rtype == RecordType.FOLLOWED_EVENT else "field-reports",
record.id,
)
return resource_uri
Expand Down

1 comment on commit 3750f7d

@szabozoltan69
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refers to #2356

Please sign in to comment.