Skip to content

Commit 0b4e619

Browse files
committed
Add DUES_PER_SEMESTER config instead of hardcoding
1 parent 297c766 commit 0b4e619

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

conditional/blueprints/member_management.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
from flask import Blueprint, request, jsonify, abort, make_response
1010

11+
from conditional import app
12+
1113
from conditional.models.models import FreshmanAccount
1214
from conditional.models.models import FreshmanEvalData
1315
from conditional.models.models import FreshmanCommitteeAttendance
@@ -642,10 +644,11 @@ def export_active_list():
642644
will_coop = CurrentCoops.query.filter(
643645
CurrentCoops.date_created > start_of_year(),
644646
CurrentCoops.uid == member.uid).first()
647+
dues_per_semester = app.config['DUES_PER_SEMESTER']
645648
if will_coop:
646-
dues = 80
649+
dues = dues_per_semester
647650
else:
648-
dues = 160
651+
dues = 2 * dues_per_semester
649652
active_list.append([full_name, rit_username, dues])
650653

651654
csvw.writerows(active_list)

config.sample.py

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@
2424
# Database config
2525
SQLALCHEMY_DATABASE_URI = 'sqlite:///{}'.format(os.path.join(os.getcwd(), "data.db"))
2626
ZOO_DATABASE_URI = 'mysql+pymysql://user:pass@host/database'
27+
28+
# General config
29+
DUES_PER_SEMESTER = 80

frontend/javascript/modules/becomeActive.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default class becomeActive {
1616

1717
FetchUtil.postWithWarning(this.endpoint, {}, {
1818
warningText: "Becoming an active member means that you will be charged" +
19-
" dues, which are $80 per semester.",
19+
" dues, which are detailed in the CSH Constitution.",
2020
successText: "You are now an active member."
2121
}, () => {
2222
document.getElementById('becomeActive').remove();

0 commit comments

Comments
 (0)