From f7e2bc673f7e8c057e183cdf978faa9fad723966 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Fri, 1 Mar 2019 20:05:29 -0600 Subject: [PATCH] Quote because postgres is stupid --- cogs/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/config.py b/cogs/config.py index 43d7cb1..92e18cd 100644 --- a/cogs/config.py +++ b/cogs/config.py @@ -50,7 +50,7 @@ class GuildConfiguration(commands.Cog): if opt == "prefix": ctx.bot.cache.update_prefix(ctx.guild, setting) try: - return await ctx.bot.db.execute(f"INSERT INTO guilds (id, {opt}) VALUES ($1, $2)", ctx.guild.id, setting) + return await ctx.bot.db.execute(f"INSERT INTO guilds (id, {opt!r}) VALUES ($1, $2)", ctx.guild.id, setting) except UniqueViolationError: return await ctx.bot.db.execute(f"UPDATE guilds SET {opt} = $1 WHERE id = $2", setting, ctx.guild.id)