Skip to content

Commit

Permalink
Changes for SQLAlchemy 1.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdilauro committed Jun 30, 2023
1 parent ae54a62 commit 7b0d380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ def relevant(cls, _db, target, language, audiences=None, production=True):
)
)
.select_from(libraries_audiences.join(Audience))
.lateral("public_audiences")
)

# Check if each library has a non-public audience from
Expand All @@ -694,7 +693,6 @@ def relevant(cls, _db, target, language, audiences=None, production=True):
)
)
.select_from(libraries_audiences.join(Audience))
.lateral("non_public_audiences")
)

# Increase the score if there was an audience match other than
Expand Down
3 changes: 2 additions & 1 deletion opds.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json

import flask
from sqlalchemy.engine.row import Row
from sqlalchemy.orm import Query

from authentication_document import AuthenticationDocument
Expand Down Expand Up @@ -78,7 +79,7 @@ def __init__(
_db, Configuration.WEB_CLIENT_URL
).value
for library in libraries:
if not isinstance(library, tuple):
if not isinstance(library, Row):
library = (library,)
self.catalog["catalogs"].append(
self.library_catalog(
Expand Down

0 comments on commit 7b0d380

Please sign in to comment.