fix exist check
This commit is contained in:
@@ -55,8 +55,7 @@ func (dh *DatabaseHandler) responsibleExists(CheckResponsible models.Person) (bo
|
||||
}
|
||||
|
||||
var person models.Person
|
||||
err := dh.database.Exists(&person, "lastName", CheckResponsible.LastName, false)
|
||||
if err != nil {
|
||||
if !dh.database.Exists(&person, "lastName", CheckResponsible.LastName, false) {
|
||||
return false, nil
|
||||
}
|
||||
return person.FirstName == CheckResponsible.FirstName && person.LastName == CheckResponsible.LastName, nil
|
||||
|
||||
Reference in New Issue
Block a user