Fix completion conversion in case of errors
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user