Skip to content

Commit

Permalink
fix ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jul 5, 2024
1 parent 9a0f670 commit 133e457
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions agixt/MagicalAuth.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,16 @@ def get_user_preferences(self):
user_preferences["subscription"] = stripe_customer["id"]
if str(user_preferences["subscription"]).lower() != "none":
if user.is_active is False:
session = stripe.CustomerSession.create(
c_session = stripe.CustomerSession.create(
customer=user_preferences["subscription"],
components={"pricing_table": {"enabled": True}},
)
raise HTTPException(
status_code=402, detail=user_preferences["subscription"]
status_code=402,
detail={
"message": f"No active subscription.",
"customer_session": c_session,
},
)
session.close()
if "email" in user_preferences:
Expand Down

0 comments on commit 133e457

Please sign in to comment.