def set_tags(self, tags): """Set the tags relations of this media, creating them as needed. :param tags: A list or comma separated string of tags to use. """ if isinstance(tags, basestring): tags = extract_tags(tags) if isinstance(tags, list) and tags: tags = fetch_and_create_tags(tags) self.tags = tags or []
def set_tags(self, tags): """Set the tags relations of this media, creating them as needed. :param tags: A list or comma separated string of tags to use. """ if isinstance(tags, basestring): tags = extract_tags(tags) if isinstance(tags, list) and tags: tags = fetch_and_create_tags(tags) self.tags = tags or []