fix address_list pagination
This commit is contained in:
parent
79a5f0e375
commit
5818270803
1 changed files with 2 additions and 0 deletions
|
@ -1211,6 +1211,8 @@ class Database(SQLiteMixin):
|
||||||
return addresses
|
return addresses
|
||||||
|
|
||||||
async def get_address_count(self, cols=None, read_only=False, **constraints):
|
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')
|
||||||
count = await self.select_addresses('COUNT(*) as total', read_only=read_only, **constraints)
|
count = await self.select_addresses('COUNT(*) as total', read_only=read_only, **constraints)
|
||||||
return count[0]['total'] or 0
|
return count[0]['total'] or 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue