Skip to content

Commit

Permalink
config: Fix {bool,string}Eq to compare Sources
Browse files Browse the repository at this point in the history
  • Loading branch information
oxzi committed Mar 19, 2024
1 parent 24a4843 commit 64c91b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/config/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ type Source struct {

// fieldEquals checks if this Source's database fields are equal to those of another Source.
func (source *Source) fieldEquals(other *Source) bool {
boolEq := func(a, b types.Bool) bool { return (!a.Valid && !b.Valid) || (a.Bool == b.Bool) }
stringEq := func(a, b types.String) bool { return (!a.Valid && !b.Valid) || (a.String == b.String) }
boolEq := func(a, b types.Bool) bool { return a.Valid == b.Valid && a.Bool == b.Bool }
stringEq := func(a, b types.String) bool { return a.Valid == b.Valid && a.String == b.String }

return source.ID == other.ID &&
source.Type == other.Type &&
Expand Down

0 comments on commit 64c91b8

Please sign in to comment.