Commit c9e90f89 by Marcus Efraimsson Committed by GitHub

Merge pull request #15873 from grafana/13344_fix

add nil/length check when delete old login attempts
parents 2bc573c8 e3b30621
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment