8 lines
276 B
Python
8 lines
276 B
Python
import sqlite3
|
|
c = sqlite3.connect("/app/data/stripe_webhook.sqlite")
|
|
r = c.execute(
|
|
"SELECT customer_email FROM licenses WHERE lower(trim(coalesce(status,'')))='active' "
|
|
"AND trim(coalesce(practice_id,''))!='' LIMIT 1"
|
|
).fetchone()
|
|
print(r[0] if r and r[0] else "")
|