Skip to content

Commit bf0ca6d

Browse files
pikachu0542tallen42BigSpaceships
authored
dev -> main (#517)
* add migrations (#514) * fix everything blowing up when old major projects exist (#515) --------- Co-authored-by: Tyler Allen <tyler@tallen.me> Co-authored-by: Noah Hanford <bigspaceships56@gmail.com>
1 parent 249edd9 commit bf0ca6d

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ RUN npm run webpack
1919
FROM docker.io/python:3.12-slim-bookworm
2020
MAINTAINER Computer Science House <webmaster@csh.rit.edu>
2121

22-
RUN mkdir /opt/conditional
22+
WORKDIR /opt/conditional
2323

2424
COPY requirements.txt /opt/conditional
2525

26-
WORKDIR /opt/conditional
27-
2826
RUN apt-get -yq update && \
2927
apt-get -yq install libsasl2-dev libldap2-dev libldap-common libssl-dev gcc g++ make && \
3028
pip install -r requirements.txt && \
@@ -35,6 +33,7 @@ ENV PORT=${PORT}
3533
EXPOSE ${PORT}
3634

3735
COPY conditional /opt/conditional/conditional
36+
COPY migrations /opt/conditional/migrations
3837
COPY *.py package.json /opt/conditional/
3938
COPY --from=build-frontend /opt/conditional/conditional/static/ /opt/conditional/conditional/static/
4039

conditional/blueprints/dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def display_dashboard(user_dict=None):
9292
"time_spent": p.time_spent,
9393
"skills": p.skills,
9494
"desc": p.description,
95-
"links": list(filter(None, p.links.split("\n"))),
95+
"links": [] if p.links is None else list(filter(None, p.links.split("\n"))),
9696
"status": p.status,
9797
}
9898
for p in get_project_list().filter(MajorProject.uid == uid)

conditional/blueprints/major_project_submission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def display_major_project(user_dict=None):
5353
"time_spent": p.time_spent,
5454
"skills": p.skills,
5555
"desc": p.description,
56-
"links": list(filter(None, p.links.split("\n"))),
56+
"links": [] if p.links is None else list(filter(None, p.links.split("\n"))),
5757
"status": p.status,
5858
"is_owner": bool(user_dict["username"] == p.uid),
5959
"files": list_files_in_folder(bucket, f"{p.id}/")

0 commit comments

Comments
 (0)