Skip to content

Commit 062832b

Browse files
authored
Merge pull request #27 from devinmatte/master
Sorting Active packets
2 parents f053429 + b9032b6 commit 062832b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packet/routes/shared.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ def packets(info=None):
4040
for sig in filter(lambda sig: sig.freshman_username == info["uid"], packet.fresh_signatures):
4141
packet.did_sign = sig.signed
4242

43+
packets.sort(key=lambda x: sum(x.signatures_received().values()), reverse=True)
44+
packets.sort(key=lambda x: x.did_sign, reverse=True)
45+
4346
return render_template("active_packets.html", info=info, packets=packets)

packet/static/js/signing.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ $(document).ready(function () {
2222
});
2323
}
2424
});
25+
location.reload();
2526
}
2627
});
2728
});
2829

29-
});
30+
});

0 commit comments

Comments
 (0)