add nil/length check when delete old login attempts
(cherry picked from commit e3b3062107)
This commit is contained in:
committed by
Hugo Häggmark
parent
3ed4d91aee
commit
3a206c5493
@@ -44,6 +44,10 @@ func DeleteOldLoginAttempts(cmd *m.DeleteOldLoginAttemptsCommand) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if result == nil || len(result) == 0 || result[0] == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
maxId = toInt64(result[0]["id"])
|
||||
|
||||
if maxId == 0 {
|
||||
|
||||
Reference in New Issue
Block a user