This commit is contained in:
zeppi 2022-04-05 14:52:12 -04:00 committed by Lex Berezhny
parent 5818270803
commit 2bd2088248

View file

@ -1212,7 +1212,8 @@ class Database(SQLiteMixin):
async def get_address_count(self, cols=None, read_only=False, **constraints):
# this is a count query that returns one line. Don't pass offset.
constraints.pop('offset')
if 'offset' in constraints:
constraints.pop('offset')
count = await self.select_addresses('COUNT(*) as total', read_only=read_only, **constraints)
return count[0]['total'] or 0