Skip to content

Commit

Permalink
[common/tasks_problems] storing offset as integer in task descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDoneux committed Oct 20, 2023
1 parent f508fa1 commit 6fbb7c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inginious/common/tasks_problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def parse_problem(self, problem_content):
offset = int(problem_content["offset"])
if offset < 1:
raise Exception("Line offset must be positive!")
problem_content["offset"] = offset
except ValueError:
raise Exception("Line offset must be an integer!")
return Problem.parse_problem(problem_content)
Expand Down

0 comments on commit 6fbb7c7

Please sign in to comment.