更新 'api/api_v1/endpoints/data_mana.py'

This commit is contained in:
leguadmin 2022-04-12 16:41:08 +08:00
parent d94af8faea
commit d7c4311f65

View File

@ -135,6 +135,10 @@ async def select_attr(
"""属性值选择映射"""
resp = await crud.select_map.get_select(db, data_in, game)
code = 0 if resp else -9
if 'map_' in resp.keys():
return schemas.Msg(code=code, msg='ok', data=resp)
else:
resp['map_'] = resp.pop('owner_name')
return schemas.Msg(code=code, msg='ok', data=resp)
@router.post("/add_attr")