Merge branch 'fix-with-only-columns' into 'master'

Fix an issue with the arguments of with_only_columns

See merge request openlp/openlp!629
This commit is contained in:
Tomas Groth 2023-07-13 20:34:04 +00:00
commit 8572f6b321
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ class DBManager(object):
query = query.where(filter_clause)
for try_count in range(3):
try:
return self.session.execute(query.with_only_columns([func.count()])).scalar()
return self.session.execute(query.with_only_columns(func.count())).scalar()
except OperationalError:
# This exception clause is for users running MySQL which likes to terminate connections on its own
# without telling anyone. See bug #927473. However, other dbms can raise it, usually in a