Skip to content

Commit

Permalink
fix(guild): use interface syntax for finding config
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvrs committed Nov 25, 2024
1 parent 8b51dd6 commit c0861f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guild.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0861f4

Please sign in to comment.