Fix test user guild on subscribe
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
Michel Roux 2022-09-12 17:48:50 +00:00
parent 2e08de2e57
commit 966510c467

View File

@ -209,7 +209,7 @@ async def subscribe(guild_id: str):
discord = make_session(token=session.get("oauth2_token"))
user_guilds = discord.get(f"{API_BASE_URL}/users/@me/guilds").json()
if not any(guild_id == user_guild.id for user_guild in user_guilds):
if not any(str(guild.id) == user_guild["id"] for user_guild in user_guilds):
return redirect(url_for(".login"))
user = discord.get(f"{API_BASE_URL}/users/@me").json()