This commit is contained in:
2026-09-07 21:38:18 +02:00
parent a29ea3e98f
commit 078faafdcd
+3 -3
View File
@@ -2451,7 +2451,7 @@ def booking_payment():
packages_str = _sanitize_text(request.values.get("packages") or request.values.get("package") or "", 200).lower()
booking_flow = _sanitize_text(request.values.get("flow") or "payment", 24).lower()
is_trial = (booking_flow == "trial") or request.values.get("is_trial", "").strip().lower() in {"1", "on", "true", "yes"}
is_trial = (booking_flow == "testversion") or request.values.get("testversion", "").strip().lower() in {"1", "on", "true", "yes"}
trial_days = int(request.values.get("trial_days") or 14)
if booking_flow not in BOOKING_FLOW_MAP and booking_flow != "trial":
@@ -2587,14 +2587,14 @@ def booking_payment():
flash(f"Gesprächstermin für {selected_package} wurde an das Team gesendet.", "success")
return redirect(url_for("user_chat"))
if booking_flow in ["payment", "trial"]:
if booking_flow in ["payment", "testversion"]:
# CORRECTED: Syntax error in the f-string is fixed below (uses single quotes inside double quotes)
booking_number = f"{'TRIAL' if is_trial else 'BOOK'}-{datetime.utcnow().strftime('%Y%m%d%H%M%S')}"
raw_base = form_data.get("tenant_slug") or form_data.get("school_name") or session.get("username") or booking_number
base = _slugify_subdomain(raw_base).lower()[:51]
effective_subdomain = f"testversion-{base}" if (is_trial and not base.startswith("testversion-")) else base
effective_subdomain = base
inst_check_client, inst_col_check = _get_collection("instances")
try: