summarylogtreecommitdiffstats
path: root/sqlalchemy.patch
blob: 1af4f28a1ffaa7a0bae845f4d9bf68b9c7416097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- cps/web.py.orig	2024-11-20 09:53:17.041632565 -0800
+++ cps/web.py	2024-11-20 09:53:33.192060201 -0800
@@ -87,8 +87,7 @@
 
 
 sql_version = importlib.metadata.version("sqlalchemy")
-sqlalchemy_version2 = ([int(x) for x in sql_version.split('.')] >= [2, 0, 0])
-
+sqlalchemy_version2 = ([int(x) if x.isnumeric() else 0 for x in sql_version.split('.')[:3]] >= [2, 0, 0])
 
 @app.after_request
 def add_security_headers(resp):