From 0cb1f96813ff854ab15a7007ecddefa1872671ab Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 17 Feb 2024 20:19:00 -0500 Subject: [PATCH] fix: bug fix exists --- account/account.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/account/account.go b/account/account.go index d234c43..1423283 100644 --- a/account/account.go +++ b/account/account.go @@ -417,7 +417,11 @@ func (s AccountServiceDefault) exists(model interface{}, conditions map[string]i return false, nil, nil } - return exists, model, NewAccountError(ErrKeyDatabaseOperationFailed, result.Error) + if exists { + return true, model, nil + } + + return false, model, NewAccountError(ErrKeyDatabaseOperationFailed, result.Error) } func (s AccountServiceDefault) validPassword(user *models.User, password string) bool {