mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #15873 from grafana/13344_fix
add nil/length check when delete old login attempts
This commit is contained in:
commit
c9e90f8957
@ -44,6 +44,10 @@ func DeleteOldLoginAttempts(cmd *m.DeleteOldLoginAttemptsCommand) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if result == nil || len(result) == 0 || result[0] == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
maxId = toInt64(result[0]["id"])
|
maxId = toInt64(result[0]["id"])
|
||||||
|
|
||||||
if maxId == 0 {
|
if maxId == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user