Skip to content

Commit cc2ce48

Browse files
committed
Removed Housing Evals Submition Model
1 parent f74eaf8 commit cc2ce48

File tree

3 files changed

+39
-43
lines changed

3 files changed

+39
-43
lines changed

conditional/blueprints/spring_evals.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from conditional.models.models import MajorProject
1212
from conditional.models.models import HouseMeeting
1313
from conditional.models.models import SpringEval
14-
from conditional.models.models import HousingEvalsSubmission
1514

1615
from conditional.util.flask import render_template
1716

@@ -55,20 +54,7 @@ def get_cm_count(member_id):
5554
print("User did not have existing spring eval data")
5655

5756
eval_data = None
58-
if internal:
59-
eval_data = HousingEvalsSubmission.query.filter(
60-
HousingEvalsSubmission.uid == uid).first()
6157

62-
if HousingEvalsSubmission.query.filter(HousingEvalsSubmission.uid == uid).count() > 0:
63-
eval_data = \
64-
{
65-
'social_attended': eval_data.social_attended,
66-
'social_hosted': eval_data.social_hosted,
67-
'seminars_attended': eval_data.technical_attended,
68-
'seminars_hosted': eval_data.technical_hosted,
69-
'projects': eval_data.projects,
70-
'comments': eval_data.comments
71-
}
7258
h_meetings = [m.meeting_id for m in
7359
MemberHouseMeetingAttendance.query.filter(
7460
MemberHouseMeetingAttendance.uid == uid

conditional/models/models.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -253,32 +253,3 @@ def __init__(self, uid):
253253
self.active = True
254254
self.date_created = datetime.now()
255255
self.status = "Pending"
256-
257-
258-
class HousingEvalsSubmission(db.Model):
259-
__tablename__ = 'housing_evals'
260-
id = Column(Integer, primary_key=True)
261-
uid = Column(String(32), nullable=False)
262-
social_attended = Column(Text, nullable=False)
263-
social_hosted = Column(Text, nullable=False)
264-
technical_attended = Column(Text, nullable=False)
265-
technical_hosted = Column(Text, nullable=False)
266-
projects = Column(Text, nullable=False)
267-
comments = Column(Text, nullable=False)
268-
points = Column(Integer, nullable=False)
269-
active = Column(Boolean, nullable=False)
270-
date_created = Column(Date, nullable=False)
271-
272-
def __init__(self, uid, social_attended,
273-
social_hosted, technical_attended,
274-
technical_hosted, projects, comments):
275-
self.uid = uid
276-
self.social_attended = social_attended
277-
self.social_hosted = social_hosted
278-
self.technical_attended = technical_attended
279-
self.technical_hosted = technical_hosted
280-
self.projects = projects
281-
self.comments = comments
282-
self.points = 0
283-
self.active = True
284-
self.date_created = datetime.now()

migrations/versions/983d69afb7f8_.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""empty message
2+
3+
Revision ID: 983d69afb7f8
4+
Revises: 218de3b34a6f
5+
Create Date: 2016-10-18 22:36:45.102164
6+
7+
"""
8+
9+
# revision identifiers, used by Alembic.
10+
revision = '983d69afb7f8'
11+
down_revision = '218de3b34a6f'
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.drop_table('housing_evals')
20+
### end Alembic commands ###
21+
22+
23+
def downgrade():
24+
### commands auto generated by Alembic - please adjust! ###
25+
op.create_table('housing_evals',
26+
sa.Column('id', sa.INTEGER(), nullable=False),
27+
sa.Column('uid', sa.VARCHAR(length=32), nullable=False),
28+
sa.Column('social_attended', sa.TEXT(), nullable=False),
29+
sa.Column('social_hosted', sa.TEXT(), nullable=False),
30+
sa.Column('technical_attended', sa.TEXT(), nullable=False),
31+
sa.Column('technical_hosted', sa.TEXT(), nullable=False),
32+
sa.Column('projects', sa.TEXT(), nullable=False),
33+
sa.Column('comments', sa.TEXT(), nullable=False),
34+
sa.Column('points', sa.INTEGER(), nullable=False),
35+
sa.Column('active', sa.BOOLEAN(), nullable=False),
36+
sa.Column('date_created', sa.DATE(), nullable=False),
37+
sa.PrimaryKeyConstraint('id')
38+
)
39+
### end Alembic commands ###

0 commit comments

Comments
 (0)