1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-21 23:50:30 +00:00

Fix version detection to work with sqlalchemy version 2.0.36.dev0

This commit is contained in:
Ozzie Isaacs 2024-11-20 17:51:09 +01:00
parent 92fbc9c792
commit 6cb1449ff3

View File

@ -87,7 +87,7 @@ except ImportError:
sql_version = metadata("sqlalchemy")["Version"]
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