Files
aza/AzA march 2026/_local_diagnostic_artifacts/_tmp_license_probe.py
2026-06-13 22:47:31 +02:00

14 lines
381 B
Python

import sqlite3
c = sqlite3.connect("/app/data/stripe_webhook.sqlite")
r = c.execute(
"SELECT practice_id, customer_email FROM licenses "
"WHERE lower(trim(coalesce(status,'')))='active' "
"AND trim(coalesce(practice_id,''))!='' LIMIT 1"
).fetchone()
if r:
print(r[0])
print("EMAIL_SET" if r[1] else "EMAIL_NONE")
else:
print("NONE")
print("EMAIL_NONE")