1
0

fix: always create new instance

This commit is contained in:
オスカー、 2023-03-23 08:38:58 +00:00 committed by GitHub
parent f29a019436
commit 150bdaeb65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
app.py
View File

@ -125,9 +125,7 @@ async def update_metadata(response: Response, code: str, steam_id: str = Cookie(
abc = await session.get(f"http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key={os.getenv('STEAM_API_KEY')}&steamids={steam_id}")
abc = await abc.json()
role = await user.fetch_role_connection()
if role is None:
role = RoleConnection(platform_name=f"Steam - {data['gameName']}", platform_username=abc["response"]["players"][0]["personaname"])
role = RoleConnection(platform_name=f"Steam - {data['gameName']}", platform_username=abc["response"]["players"][0]["personaname"])
success = 0
total = len(data["achievements"])
async for achieve in async_list(data["achievements"]):