diff --git a/api/api_v1/authz/authz.py b/api/api_v1/authz/authz.py index af8b8d4..e10abd4 100644 --- a/api/api_v1/authz/authz.py +++ b/api/api_v1/authz/authz.py @@ -300,6 +300,14 @@ async def account_owner_list(request: Request, "comparator": "in", "ftv": data_in.owners } + if not data_in.owners[0]: + res = await crud.user.update_one(db, {'name': data_in.account_name, + f'data_where.{game}': {'$exists': True} + }, + {'$pull': {f'data_where.{game}': {'columnName': 'owner_name'}}} + ) + return schemas.Msg(code=0, msg='ok', data=res.raw_result) + is_exists = await crud.user.find_one(db, {'name': data_in.account_name, f'data_where.{game}': {'$exists': True}, })