Skip to content

Commit

Permalink
api: fix SNS client endpoint/email
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Feb 6, 2021
1 parent 6cc5842 commit 8130433
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mpcontribs-api/mpcontribs/api/projects/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ def post_save(cls, sender, document, **kwargs):
Name=f"mpcontribs_{document.name}",
Attributes={"DisplayName": f"MPContribs {document.title}"},
)
endpoint = document.owner.split(":", 1)[1]
sns_client.subscribe(
TopicArn=resp["TopicArn"], Protocol="email", Endpoint=document.owner
TopicArn=resp["TopicArn"], Protocol="email", Endpoint=endpoint
)
else:
set_keys = document._delta()[0].keys()
Expand Down

0 comments on commit 8130433

Please sign in to comment.