Fix completion conversion in case of errors
All checks were successful
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 13s
CI / test (push) Successful in 30s

This commit is contained in:
sto
2025-06-19 17:28:55 +02:00
parent ac83a599f3
commit 71f2bb6b70
4 changed files with 20 additions and 10 deletions

View File

@@ -44,6 +44,8 @@ class Completion < ApplicationRecord
self.time_seconds = arr[0].to_i * 3600 + arr[1].to_i * 60 + arr[2].to_i
elsif arr.size == 2
self.time_seconds = arr[0].to_i * 60 + arr[1].to_i
elsif arr.size == 1
self.time_seconds = arr[0].to_i
end
end
end