-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip Fix #1392 stash Convertkit until self-service onboarding
- Loading branch information
1 parent
c746c50
commit a6a7ec8
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,6 +130,30 @@ def receiver_new_subscriber(*args, **kwargs): | |
newSubscriberEmailNotification(**kwargs) | ||
|
||
|
||
def receiver_new_subscriber_add_to_convertkit() | ||
subscription_uuid = kwargs.get("subscription_uuid") | ||
subscription = None | ||
try: | ||
subscription = ( | ||
Subscription.query.where(Subscription.uuid == subscription_uuid) | ||
.execution_options(include_archived=True) | ||
.one() | ||
) | ||
subscriber_email = subscription.person.email | ||
except sqlalchemy.exc.NoResultFound: | ||
if subscription is None and subscription_uuid != "test": | ||
msg = "Got receiver_new_subscriber_add_to_convertkit event but no associated subscription found." # noqa: E501 | ||
log.error(msg) | ||
return | ||
elif subscription_uuid == "test": | ||
log.info("Testing receiver_new_subscriber_add_to_convertkit with dummy subscription") | ||
subscriber_email = "[email protected]" | ||
|
||
|
||
|
||
create_convertkit_subscriber_enttry_name_thihng() | ||
|
||
|
||
def receiver_new_donation(*args, **kwargs): | ||
to_email = kwargs.get("email") | ||
send_donation_thankyou_email(to_email=to_email) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters