mirror of https://gitlab.com/openlp/openlp.git
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:
commit
8572f6b321
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue