Fix API to not throw an exception if value of tags is None.
@@ -25,8 +25,10 @@ class TagsHelper(object):
@staticmethod
def to_model(tags):
+ tags = tags or []
return [TagField(name=tag.get('name', ''), value=tag.get('value', '')) for tag in tags]
@staticmethod
def from_model(tags):
+ tags = tags or []
return [{'name': tag.name, 'value': tag.value} for tag in tags]
