Skip to content

Commit 151d4b0

Browse files
committed
Fixed the bug fix
1 parent 0bf270a commit 151d4b0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packet/routes/shared.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ def packets(info=None):
3131
if app.config["REALM"] == "csh":
3232
# User is an upperclassman
3333
for packet in packets:
34-
for sig in filter(lambda sig: sig.member == info["uid"], chain(packet.upper_signatures,
35-
packet.misc_signatures)):
36-
packet.did_sign = sig.signed
34+
for sig in chain(packet.upper_signatures, packet.misc_signatures):
35+
packet.did_sign = sig.signed and sig.member == info["uid"]
3736
else:
3837
# User is a freshman
3938
for packet in packets:
40-
for sig in filter(lambda sig: sig.freshman_username == info["uid"], packet.fresh_signatures):
41-
packet.did_sign = sig.signed
39+
for sig in packet.fresh_signatures:
40+
packet.did_sign = sig.signed and sig.freshman_username == info["uid"]
4241

4342
return render_template("active_packets.html", info=info, packets=packets)

0 commit comments

Comments
 (0)