mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-29 14:27:41 +00:00
Bugfixes for sqlalchemy 1.4.0
This commit is contained in:
12
cps/db.py
12
cps/db.py
@@ -627,15 +627,17 @@ class CalibreDB():
|
||||
randm = self.session.query(Books) \
|
||||
.filter(self.common_filters(allow_show_archived)) \
|
||||
.order_by(func.random()) \
|
||||
.limit(self.config.config_random_books)
|
||||
.limit(self.config.config_random_books).all()
|
||||
else:
|
||||
randm = false()
|
||||
off = int(int(pagesize) * (page - 1))
|
||||
query = self.session.query(database) \
|
||||
.filter(db_filter) \
|
||||
query = self.session.query(database)
|
||||
if len(join) == 3:
|
||||
query = query.outerjoin(join[0], join[1]).outerjoin(join[2])
|
||||
elif len(join) == 2:
|
||||
query = query.outerjoin(join[0], join[1])
|
||||
query = query.filter(db_filter)\
|
||||
.filter(self.common_filters(allow_show_archived))
|
||||
if len(join):
|
||||
query = query.join(*join, isouter=True)
|
||||
entries = list()
|
||||
pagination = list()
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user