From c0861f4fab3bc542ab701ded63cbc83ed695ed49 Mon Sep 17 00:00:00 2001 From: sylvrs Date: Mon, 25 Nov 2024 03:54:56 -0600 Subject: [PATCH] fix(guild): use interface syntax for finding config --- guild.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guild.go b/guild.go index 096c94e..7ce4254 100644 --- a/guild.go +++ b/guild.go @@ -101,7 +101,7 @@ func (mng *GuildManager) Stop() error { // ... func (mng *GuildManager) FetchServiceConfig(config interface{}, defaults ...interface{}) error { mng.connection.AutoMigrate(&config) - return mng.Connection().Where("guild_id=?", mng.guild.ID).Attrs(defaults).FirstOrCreate(config).Error + return mng.Connection().Where(&ServiceConfiguration{GuildId: mng.guild.ID}).Attrs(defaults).FirstOrCreate(config).Error } // SaveServiceConfig saves the service configuration to the database