Commit 233e2257 authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Allow to access tasks with unlimited time (fixes #32)

parent e4391061
......@@ -380,7 +380,7 @@ pub fn show_task<T: MedalConnection>(conn: &T, task_id: u32, session_token: Stri
data.insert("participation_start_date".to_string(), to_json(&format!("{}", passed_secs)));
let left_secs = i64::from(c.duration) * 60 - passed_secs;
if left_secs < 0 {
if c.duration > 0 && left_secs < 0 {
Err(MedalError::AccessDenied)
// Contest over
// TODO: Nicer message!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment