Skip to content

Commit

Permalink
Fix submission tests
Browse files Browse the repository at this point in the history
  • Loading branch information
knrafto committed Jan 31, 2016
1 parent 7cc8448 commit d880d41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def active_user_ids(self, user_id):
else:
return {member.user_id for member in members}

def backups(self, user_ids, submit):
def backups(self, user_ids, submit=False):
"""Return a query for the backups that the list of users has for this
assignment.
"""
Expand All @@ -177,6 +177,9 @@ def backups(self, user_ids, submit):
Backup.submit == submit
).order_by(Backup.client_time.desc())

def submissions(self, user_ids):
return self.backups(user_ids, submit=True)

def final_submission(self, user_ids):
"""Return a final submission for a user, or None."""
return Backup.query.filter(
Expand Down

0 comments on commit d880d41

Please sign in to comment.