This commit is contained in:
Mateusz Gruszczyński committed 2025-09-26 22:42:10 +02:00
1 parent b679700c6d
commit dfa3028dad
6 files changed
+44 -21

No files matched your search

+7 -7
View File
@@ -178,13 +178,13 @@ def load_user(user_id):
@event.listens_for(Engine, "connect")
def set_sqlite_pragma(dbapi_connection, connection_record):
try:
cursor = dbapi_connection.cursor()
cursor.execute("PRAGMA foreign_keys=ON")
cursor.close()
except Exception:
pass
if dbapi_connection.__class__.__module__.startswith('sqlite3'):
try:
cursor = dbapi_connection.cursor()
cursor.execute("PRAGMA foreign_keys=ON")
cursor.close()
except Exception:
pass
def get_real_ip():
headers = request.headers