Skip to content

Commit 91841dd

Browse files
committed
Add migration and fix element name
1 parent ccc802c commit 91841dd

3 files changed

Lines changed: 44 additions & 3 deletions

File tree

conditional/blueprints/gatekeep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def display_spring_evals(internal=False, user_dict=None):
112112
ts_attended_count = ts_count.get(uid, 0)
113113
ts_hosted_count = ts_host_count.get(uid, 0)
114114

115-
passing = len(member_missed_hms) <= 1 and cm_attended_count >= 6 and ts_attended_count >= 2
115+
passing = len(member_missed_hms) <= 1 and cm_attended_count >= 6 and (ts_attended_count >= 2 or ts_hosted_count >= 1)
116116

117117
status = 'disenfranchised'
118118

frontend/javascript/modules/attendanceForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export default class AttendanceForm {
5252
let hostSplit = MemberUtil.splitFreshmenUpperclassmen(
5353
this.fields[field].value.split(',')
5454
);
55-
payload.freshmanHost = hostSplit.freshmen;
56-
payload.memberHost = hostSplit.upperclassmen;
55+
payload.freshman_host = hostSplit.freshmen;
56+
payload.member_host = hostSplit.upperclassmen;
5757
} else {
5858
payload[field] = this.fields[field].value;
5959
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"""empty message
2+
3+
Revision ID: ce92a683ecf8
4+
Revises: 95538b39976f
5+
Create Date: 2026-04-01 19:08:20.149992
6+
7+
"""
8+
9+
# revision identifiers, used by Alembic.
10+
revision = 'ce92a683ecf8'
11+
down_revision = '95538b39976f'
12+
13+
from alembic import op
14+
import sqlalchemy as sa
15+
16+
17+
def upgrade():
18+
# ### commands auto generated by Alembic - please adjust! ###
19+
op.create_table('freshman_seminar_host',
20+
sa.Column('id', sa.Integer(), nullable=False),
21+
sa.Column('fid', sa.Integer(), nullable=False),
22+
sa.Column('seminar_id', sa.Integer(), nullable=False),
23+
sa.ForeignKeyConstraint(['fid'], ['freshman_accounts.id'], ),
24+
sa.ForeignKeyConstraint(['seminar_id'], ['technical_seminars.id'], ),
25+
sa.PrimaryKeyConstraint('id')
26+
)
27+
op.create_table('member_seminar_host',
28+
sa.Column('id', sa.Integer(), nullable=False),
29+
sa.Column('uid', sa.String(length=32), nullable=False),
30+
sa.Column('seminar_id', sa.Integer(), nullable=False),
31+
sa.ForeignKeyConstraint(['seminar_id'], ['technical_seminars.id'], ),
32+
sa.PrimaryKeyConstraint('id')
33+
)
34+
# ### end Alembic commands ###
35+
36+
37+
def downgrade():
38+
# ### commands auto generated by Alembic - please adjust! ###
39+
op.drop_table('member_seminar_host')
40+
op.drop_table('freshman_seminar_host')
41+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)