From 836445871a5ba0355d42453dd5c384b3fd18b9dd Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 6 Apr 2022 09:09:07 -0400 Subject: [PATCH] re-use existing constraints cleanup function --- lbry/wallet/database.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lbry/wallet/database.py b/lbry/wallet/database.py index e3a4cf7a09..48acebc5d6 100644 --- a/lbry/wallet/database.py +++ b/lbry/wallet/database.py @@ -1211,9 +1211,7 @@ async def get_addresses(self, cols=None, read_only=False, **constraints): return addresses 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. - if 'offset' in constraints: - constraints.pop('offset') + self._clean_txo_constraints_for_aggregation(constraints) count = await self.select_addresses('COUNT(*) as total', read_only=read_only, **constraints) return count[0]['total'] or 0