stripe: Fix customer charged for upgrade during free trial.

I accidentally free trials for both cloud and self hosted
enabled while testing, hence didn't catch it.

This mostly involves fixing `is_free_trial_offer_enabled` to
return the correct value and providing it the correct input.
This commit is contained in:
Aman Agrawal
2023-12-11 13:20:13 +00:00
committed by Tim Abbott
parent df23701475
commit 8e617f5df8
3 changed files with 9 additions and 6 deletions

View File

@@ -392,7 +392,7 @@ def login_or_register_remote_user(request: HttpRequest, result: ExternalAuthResu
if is_realm_creation is not None and settings.BILLING_ENABLED:
from corporate.lib.stripe import is_free_trial_offer_enabled
if is_free_trial_offer_enabled():
if is_free_trial_offer_enabled(False):
redirect_to = reverse("upgrade_page")
redirect_to = get_safe_redirect_to(redirect_to, user_profile.realm.uri)