Add method to update contestants through admin UI
Some checks failed
CI / scan_ruby (push) Successful in 19s
CI / scan_js (push) Successful in 14s
CI / lint (push) Successful in 13s
CI / test (push) Failing after 35s

This commit is contained in:
sto
2025-11-18 11:15:23 +01:00
parent ecb36e19ed
commit 63a88ea113
5 changed files with 35 additions and 2 deletions

View File

@@ -68,7 +68,11 @@ class Completion < ApplicationRecord
self.time_seconds = arr[0].to_i
end
else
self.time_seconds = self.contest.duration_seconds
if self.contest.duration_seconds.present?
self.time_seconds = self.contest.duration_seconds
else
self.time_seconds = 2 * 3600
end
self.display_time_from_start = display_time(self.time_seconds)
end
end