From 2eb23c8c24dbe8a285fe2f91cfc1ea90e30d1049 Mon Sep 17 00:00:00 2001 From: Mobmaker <45888585+Mobmaker55@users.noreply.github.com> Date: Tue, 24 Sep 2024 23:34:45 -0400 Subject: [PATCH 1/2] Allow all frosh to vote (please test this) --- packet/commands.py | 2 +- packet/routes/shared.py | 7 ------- packet/templates/active_packets.html | 7 +------ packet/templates/packet.html | 4 ++-- packet/utils.py | 12 ++---------- 5 files changed, 6 insertions(+), 26 deletions(-) diff --git a/packet/commands.py b/packet/commands.py index ea3591a..3a4e0e6 100644 --- a/packet/commands.py +++ b/packet/commands.py @@ -194,7 +194,7 @@ def remove_sig(packet_id: int, username: str, is_member: bool) -> None: db.session.commit() print('Successfully unsigned packet') else: - print('Failed to unsign packet; {} is not an onfloor'.format(username)) + print('Failed to unsign packet; could not find signature'.format(username)) @app.cli.command('remove-member-sig') diff --git a/packet/routes/shared.py b/packet/routes/shared.py index 3508faa..bd671bf 100644 --- a/packet/routes/shared.py +++ b/packet/routes/shared.py @@ -27,12 +27,6 @@ def freshman_packet(packet_id, info=None): if packet is None: return 'Invalid packet or freshman', 404 else: - can_sign = packet.is_open() - - # If the packet is open and the user is an off-floor freshman set can_sign to False - if packet.is_open() and app.config['REALM'] != 'csh': - if info['uid'] not in map(lambda sig: sig.freshman_username, packet.fresh_signatures): - can_sign = False # The current user's freshman signature on this packet fresh_sig = list(filter( @@ -43,7 +37,6 @@ def freshman_packet(packet_id, info=None): return render_template('packet.html', info=info, packet=packet, - can_sign=can_sign, did_sign=packet.did_sign(info['uid'], app.config['REALM'] == 'csh'), required=packet.signatures_required(), received=packet.signatures_received(), diff --git a/packet/templates/active_packets.html b/packet/templates/active_packets.html index bd8fdc3..930d736 100644 --- a/packet/templates/active_packets.html +++ b/packet/templates/active_packets.html @@ -20,7 +20,6 @@