#coding:utf-8

from gm_types.gaia import MULTITOPIC_REVIEW_TYPE

from talos.backbone.rpc import get_gaia_local_invoker


def push_create_topic_to_multi_topic(topic_id, tags):
    r = get_gaia_local_invoker()
    try:
        r['api/multitopic/process_related_item_create'](item_id=topic_id,
                                                        content_type=MULTITOPIC_REVIEW_TYPE.PROBLEM,
                                                        tags=tags,
                                                        ).unwrap()
    except Exception as why:
        return None

    return {'status': 'success'}
