diff --git a/lbry/lbry/wallet/server/db.py b/lbry/lbry/wallet/server/db.py index 1dd0ca36d..8b8fcc24a 100644 --- a/lbry/lbry/wallet/server/db.py +++ b/lbry/lbry/wallet/server/db.py @@ -791,7 +791,7 @@ class SQLDB: if isinstance(match, sqlite3.Row): constraints['channel_hash'] = match['claim_hash'] else: - raise LookupError(f'Could not resolve channel "{channel_url}".') + return [[0]] if cols == 'count(*)' else [] if 'channel_hash' in constraints: constraints['claim.channel_hash'] = sqlite3.Binary(constraints.pop('channel_hash')) if 'channel_ids' in constraints: diff --git a/lbry/tests/integration/test_claim_commands.py b/lbry/tests/integration/test_claim_commands.py index 96cf80241..6a0d9f8ea 100644 --- a/lbry/tests/integration/test_claim_commands.py +++ b/lbry/tests/integration/test_claim_commands.py @@ -139,6 +139,7 @@ class ClaimSearchCommand(ClaimTestCase): await self.assertFindsClaims(claims, channel=f"@abc#{self.channel_id}") await self.assertFindsClaims([three, two, signed2, signed], channel_ids=[channel_id2, self.channel_id]) await self.channel_abandon(claim_id=self.channel_id) + await self.assertFindsClaims([], channel=f"@abc#{self.channel_id}", valid_channel_signatures=True) await self.assertFindsClaims([], channel_ids=[self.channel_id], valid_channel_signatures=True) await self.assertFindsClaims([signed2], channel_ids=[channel_id2], valid_channel_signatures=True) # pass `invalid_channel_signatures=False` to catch a bug in argument processing