def post(self): name = request.values.get("name") cr_ids = request.values.get("cr_ids") views, id2type, name2id = PreferenceManager.create_or_update_relation_view(name, cr_ids) return self.jsonify(views=views, id2type=id2type, name2id=name2id)
def post(self): name = request.values.get("name") parent_id = request.values.get("parent_id") child_id = request.values.get("child_id") res = PreferenceManager.create_or_update_relation_view(name, parent_id, child_id) return self.jsonify(res.to_dict())