Skip to content

Commit a654163

Browse files
Fix bug with RWS and the new score mode
The extra field is a list of strings, that need to be converted to numbers.
1 parent 97b7d78 commit a654163

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmsranking/Scoring.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Contest Management System - http://cms-dev.github.io/
55
# Copyright © 2011-2013 Luca Wehrstedt <luca.wehrstedt@gmail.com>
66
# Copyright © 2018 Stefano Maggiolo <s.maggiolo@gmail.com>
7+
# Copyright © 2018 William Di Luigi <williamdiluigi@gmail.com>
78
#
89
# This program is free software: you can redistribute it and/or modify
910
# it under the terms of the GNU Affero General Public License as
@@ -127,7 +128,7 @@ def append_change(self, change):
127128
[submission.score
128129
for submission in itervalues(self._submissions)])
129130
elif self._score_mode == SCORE_MODE_MAX_SUBTASK:
130-
scores_by_submission = (s.extra or []
131+
scores_by_submission = (map(float, s.extra or [])
131132
for s in itervalues(self._submissions))
132133
scores_by_subtask = zip_longest(*scores_by_submission,
133134
fillvalue=0.0)

0 commit comments

Comments
 (0)