Fix datetime sort error
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
This commit is contained in:
parent
1739f85ec7
commit
2c63dcf25c
@ -221,7 +221,7 @@ def view_doorboy_admin():
|
|||||||
|
|
||||||
orphaned_keyfobs = sorted(orphaned_keyfobs, key = lambda o : (not bool(o.get("comment")), o.get("comment", "")))
|
orphaned_keyfobs = sorted(orphaned_keyfobs, key = lambda o : (not bool(o.get("comment")), o.get("comment", "")))
|
||||||
no_keyfobs = sorted(no_keyfobs, key = lambda u : u.display_name or u.username)
|
no_keyfobs = sorted(no_keyfobs, key = lambda u : u.display_name or u.username)
|
||||||
last_seen = dict(sorted(last_seen.items(), key = lambda item: item[1], reverse=True))
|
last_seen = dict(sorted(last_seen.items(), key = lambda item: item[1] or datetime.min, reverse=True))
|
||||||
return render_template("doorboy_admin.html", **locals())
|
return render_template("doorboy_admin.html", **locals())
|
||||||
|
|
||||||
@page_doorboy.route("/m/doorboy/swipes")
|
@page_doorboy.route("/m/doorboy/swipes")
|
||||||
|
Loading…
Reference in New Issue
Block a user