From 64c91b88a276c3e954b6f27396c104d01ffd766d Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Tue, 19 Mar 2024 10:51:02 +0100 Subject: [PATCH] config: Fix {bool,string}Eq to compare Sources --- internal/config/source.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config/source.go b/internal/config/source.go index dce0a3f24..35cf1c65c 100644 --- a/internal/config/source.go +++ b/internal/config/source.go @@ -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 &&