mirror of
https://github.com/grafana/grafana.git
synced 2025-01-21 22:13:38 -06:00
add nil/length check when delete old login attempts
This commit is contained in:
parent
f9e3c33ebd
commit
e3b3062107
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user