diff --git a/query_discord_music.py b/query_discord_music.py index aa3cf10a..a788243d 100644 --- a/query_discord_music.py +++ b/query_discord_music.py @@ -117,4 +117,4 @@ LEFT JOIN GROUP BY playedmusic.enqueuer_id ) last_play_times ON playedmusic.timestamp = last_play_times.last_play_time ) last_songs ON last_songs.discord_id = discord.discord_id -WHERE discord.royal_id = ?;""" \ No newline at end of file +WHERE discord.royal_id = :royal;""" \ No newline at end of file diff --git a/webserver.py b/webserver.py index 9041408e..bfdf528f 100644 --- a/webserver.py +++ b/webserver.py @@ -82,7 +82,7 @@ def page_profile(name: str): lol = db_session.query(db.LeagueOfLegends).filter_by(royal=user).one_or_none() ow = db_session.query(db.Overwatch).filter_by(royal=user).one_or_none() tg = db_session.query(db.Telegram).filter_by(royal=user).one_or_none() - discord = db_session.bind.execute(query_discord_music.one_query, user.id).fetchone() + discord = db_session.execute(query_discord_music.one_query, royal=user.id).fetchone() db_session.close() return render_template("profile.html", ryg=user, css=css, osu=osu, rl=rl, dota=dota, lol=lol, steam=steam, ow=ow, tg=tg, discord=discord, config=config)