From c8aa73a5d6f3a20ff3dafc21d84f5e6bd7a25857 Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 24 Mar 2022 18:41:29 -0400 Subject: [PATCH] wip --- lbry/wallet/server/db/elasticsearch/search.py | 4 ++++ tests/integration/claims/test_claim_commands.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lbry/wallet/server/db/elasticsearch/search.py b/lbry/wallet/server/db/elasticsearch/search.py index 5ea73b765..4d5bcd043 100644 --- a/lbry/wallet/server/db/elasticsearch/search.py +++ b/lbry/wallet/server/db/elasticsearch/search.py @@ -647,6 +647,10 @@ def expand_query(**kwargs): {"must_not": [ {"term": {"reposted_claim_type": CLAIM_TYPES['stream']}} + ], + "must": + [ + {"term": {"claim_type": CLAIM_TYPES['repost']}} ] } } diff --git a/tests/integration/claims/test_claim_commands.py b/tests/integration/claims/test_claim_commands.py index 7cfb48e4c..d733f7590 100644 --- a/tests/integration/claims/test_claim_commands.py +++ b/tests/integration/claims/test_claim_commands.py @@ -418,7 +418,7 @@ class ClaimSearchCommand(ClaimTestCase): print('NOSRC', no_source_claims) print('MP4', mp4_claims) print('NSRC NO MEDIA', no_source_claims_no_media) - # self.assertEqual(1, len(no_source_claims_no_media)) + self.assertEqual(1, len(no_source_claims_no_media)) self.assertEqual(1, len(no_source_claims)) self.assertEqual(1, len(mp4_claims))