mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-09-01 01:35:14 +00:00
ignore default values
This commit is contained in:
parent
57dffaa2ce
commit
d713783736
1 changed files with 3 additions and 0 deletions
|
@ -176,6 +176,9 @@ def fix_kwargs_for_hub(**kwargs):
|
||||||
value_fields = {"tx_nout", "has_source", "is_signature_valid"}
|
value_fields = {"tx_nout", "has_source", "is_signature_valid"}
|
||||||
opcodes = {'=': 0, '<=': 1, '>=': 2, '<': 3, '>': 4}
|
opcodes = {'=': 0, '<=': 1, '>=': 2, '<': 3, '>': 4}
|
||||||
for key, value in list(kwargs.items()):
|
for key, value in list(kwargs.items()):
|
||||||
|
if value in (None, [], False):
|
||||||
|
kwargs.pop(key)
|
||||||
|
continue
|
||||||
if key in REPLACEMENTS:
|
if key in REPLACEMENTS:
|
||||||
kwargs[REPLACEMENTS[key]] = kwargs.pop(key)
|
kwargs[REPLACEMENTS[key]] = kwargs.pop(key)
|
||||||
key = REPLACEMENTS[key]
|
key = REPLACEMENTS[key]
|
||||||
|
|
Loading…
Add table
Reference in a new issue