def update_tag_description(tag: model.Tag, description: str) -> None: assert tag if util.value_exceeds_column_size(description, model.Tag.description): raise InvalidTagDescriptionError('Description is too long.') tag.description = description or None
def update_tag_category_name(tag: model.Tag, category_name: str) -> None: assert tag tag.category = tag_categories.get_category_by_name(category_name)
def update_tag_suggestions(tag: model.Tag, relations: List[str]) -> None: assert tag if _check_name_intersection(_get_names(tag), relations, False): raise InvalidTagRelationError('Tag cannot suggest itself.') tag.suggestions = get_tags_by_names(relations)
def update_tag_description(tag: model.Tag, description: str) -> None: assert tag if util.value_exceeds_column_size(description, model.Tag.description): raise InvalidTagDescriptionError("Description is too long.") tag.description = description or None
def update_tag_suggestions(tag: model.Tag, relations: List[str]) -> None: assert tag if _check_name_intersection(_get_names(tag), relations, False): raise InvalidTagRelationError("Tag cannot suggest itself.") tag.suggestions = get_tags_by_names(relations)
def update_tag_suggestions(tag: model.Tag, relations: List[str]) -> None: assert tag if _check_name_intersection(_get_names(tag), relations, False): raise InvalidTagRelationError('태그는 자기 자신을 제안 태그로 지정할 수 없습니다.') tag.suggestions = get_tags_by_names(relations)
def update_tag_implications(tag: model.Tag, relations: List[str]) -> None: assert tag if _check_name_intersection(_get_names(tag), relations, False): raise InvalidTagRelationError('Tag cannot imply itself.') tag.implications = get_tags_by_names(relations)