Skip to content

Commit 7107971

Browse files
committed
saving progress
1 parent e42abf9 commit 7107971

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

api/API/collaborators.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from api.everything import *
22
from faculty import get_faculty_by_bnumbers
3+
4+
35
def getAllCollaborators():
46
""" gets all of the collaborators from the collaborators table
57
@@ -13,7 +15,7 @@ def getAllCollaborators():
1315
return None
1416

1517
def getCollaborators (username):
16-
""" gets all of the collaborator for a user
18+
""" gets all of the collaborators for a user
1719
1820
Args:
1921
username (str): the user to whom the project belongs
@@ -81,7 +83,7 @@ def get_collaborator(project_id, username):
8183
""" gets a collaborator
8284
8385
Args:
84-
username (str): the username of of the collaborators_get
86+
username (str): the username of the collaborators_get
8587
project_id (int): the id of the project
8688
8789
Returns:
@@ -91,7 +93,7 @@ def get_collaborator(project_id, username):
9193
.where(Collaborators.pID==project_id))
9294

9395
if collaborator.exists():
94-
return collaborator.get()
96+
return collaborator.get() # FIXME: expects only one collaborator, will break with 2+
9597
else:
9698
return None
9799

api/chair/manageCommittee.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
from ..API.parameters import getCurrentParameters
33
from forms import ManageCommitteeForm
44
from ..API.committee import addCommitteeMembers, removeCommitteeMembers, getCommitteeMembers
5-
65
from ..pages import *
76

7+
8+
9+
810
@app.route("/chair/manageCommittee", methods = ["GET"])
911
@login_required
1012
def manageCommittee_GET ():

api/templates/pages/bnumbers.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ <h4>Collaborator #{{id + 1}}</h4>
3333
class = 'form-control'
3434
placeholder = 'B012345678'
3535
value =
36-
"{% if collabs is not none and id < collabs|length %}{{collabs[id].username.bnumber}}{% endif %}"
36+
"{% if collabs is not none and id < collabs|length %}
37+
{{collabs[id].username.bnumber}}{% endif %}"
3738
required
3839
/>
3940

0 commit comments

Comments
 (0)