skip null args given to channel_ids in claim search

This commit is contained in:
Jack Robison 2020-12-29 21:41:07 -05:00
parent ab3d9bd080
commit 0758b85179
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -283,7 +283,7 @@ def claims_query(cols, for_count=False, **constraints) -> Tuple[str, Dict]:
channel_ids = constraints.pop('channel_ids') channel_ids = constraints.pop('channel_ids')
if channel_ids: if channel_ids:
constraints['claim.channel_hash__in'] = { constraints['claim.channel_hash__in'] = {
unhexlify(cid)[::-1] for cid in channel_ids unhexlify(cid)[::-1] for cid in channel_ids if cid
} }
if 'not_channel_ids' in constraints: if 'not_channel_ids' in constraints:
not_channel_ids = constraints.pop('not_channel_ids') not_channel_ids = constraints.pop('not_channel_ids')