Skip to content

Commit b8b6472

Browse files
committed
don't return error for query
1 parent 945d807 commit b8b6472

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

isis.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ func Generate(conn *gorm.DB, identifier string, digits int, validity int) (token
1212

1313
var exitingOtp otp
1414

15-
err = conn.Where("identifier = ?", identifier).First(&exitingOtp).Count(&exitingOtpCount).Error
16-
17-
if err != nil {
18-
return
19-
}
15+
_ = conn.Where("identifier = ?", identifier).First(&exitingOtp).Count(&exitingOtpCount)
2016

2117
if exitingOtpCount > 0 {
2218
err = conn.Delete(&exitingOtp).Error

0 commit comments

Comments
 (0)