From e3f080a7ad652b30a7d31ef0b019f0c2184e6036 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 18 May 2020 08:15:24 -0400 Subject: [PATCH] extract singular tags, languages, locations from kwargs --- lbry/schema/__init__.py | 1 - lbry/schema/claim.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lbry/schema/__init__.py b/lbry/schema/__init__.py index b5ab2a718..e69de29bb 100644 --- a/lbry/schema/__init__.py +++ b/lbry/schema/__init__.py @@ -1 +0,0 @@ -from .claim import Claim \ No newline at end of file diff --git a/lbry/schema/claim.py b/lbry/schema/claim.py index 2c3c84dcd..3a23575b4 100644 --- a/lbry/schema/claim.py +++ b/lbry/schema/claim.py @@ -139,7 +139,10 @@ class BaseClaim: field = getattr(self, l) if kwargs.pop(f'clear_{l}', False): del field[:] - items = kwargs.pop(l, None) + if l in ('tags', 'languages', 'locations'): + items = kwargs.pop(l[:-1], None) + else: + items = kwargs.pop(l, None) if items is not None: if isinstance(items, str): field.append(items)