File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 20
20
InviteOut ,
21
21
User ,
22
22
Organization ,
23
- Subscription
23
+ Subscription ,
24
24
)
25
25
from .users import UserManager
26
26
from .emailsender import EmailSender
Original file line number Diff line number Diff line change @@ -1960,6 +1960,7 @@ class SubscriptionCanceledResponse(BaseModel):
1960
1960
deleted : bool
1961
1961
canceled : bool
1962
1962
1963
+
1963
1964
# ============================================================================
1964
1965
class SubscriptionReminderResponse (BaseModel ):
1965
1966
"""Response model for subscription reminder"""
Original file line number Diff line number Diff line change @@ -197,16 +197,14 @@ async def send_trial_end_reminder(
197
197
)
198
198
199
199
if not org .subscription :
200
- print (f"Subscription not found for organization ID { org .id } with sub id { reminder .subId } " )
201
- raise HTTPException (
202
- status_code = 404 , detail = "subscription_not_found"
200
+ print (
201
+ f"Subscription not found for organization ID { org .id } with sub id { reminder .subId } "
203
202
)
203
+ raise HTTPException (status_code = 404 , detail = "subscription_not_found" )
204
204
205
205
if not org .subscription .futureCancelDate :
206
206
print (f"Future cancel date not found for subscription ID { reminder .subId } " )
207
- raise HTTPException (
208
- status_code = 404 , detail = "future_cancel_date_not_found"
209
- )
207
+ raise HTTPException (status_code = 404 , detail = "future_cancel_date_not_found" )
210
208
211
209
users = await self .org_ops .get_users_for_org (org , UserRole .OWNER )
212
210
await asyncio .gather (
@@ -216,7 +214,7 @@ async def send_trial_end_reminder(
216
214
user_name = user .name ,
217
215
receiver_email = user .email ,
218
216
org = org ,
219
- behavior_on_trial_end = reminder .behavior_on_trial_end
217
+ behavior_on_trial_end = reminder .behavior_on_trial_end ,
220
218
)
221
219
for user in users
222
220
]
You can’t perform that action at this time.
0 commit comments