Require contest durations, prefill end times for unfinished puzzles & allow to modify them
Some checks failed
CI / scan_ruby (push) Successful in 19s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 14s
CI / test (push) Failing after 44s

This commit is contained in:
sto
2025-11-18 11:46:02 +01:00
parent 63a88ea113
commit 3dd153d587
8 changed files with 19 additions and 18 deletions

View File

@@ -68,11 +68,7 @@ class Completion < ApplicationRecord
self.time_seconds = arr[0].to_i
end
else
if self.contest.duration_seconds.present?
self.time_seconds = self.contest.duration_seconds
else
self.time_seconds = 2 * 3600
end
self.time_seconds = self.contest.duration_seconds
self.display_time_from_start = display_time(self.time_seconds)
end
end
@@ -82,9 +78,6 @@ class Completion < ApplicationRecord
self.remaining_pieces = nil
else
self.missing_pieces = nil
if !self.offline.present?
self.display_time_from_start = nil
end
end
end