def update_topic_schema( topic_id, topic: Topic): if type(topic) is not dict: topic = topic.dict() update_topic(topic_id, topic) return Topic.parse_obj(topic)
def update_topic_schema(topic_id, topic: Topic): update_topic(topic_id, topic) result = Topic.parse_obj(topic) if settings.INDEX_ON and topic.type != RAW: factor_index_service.update_factor_index_data(result, topic.tenantId) return result