Skip to content

Commit 245d4a1

Browse files
committed
Support string interval coming from report preview
I hit this when running the UI tests without a simulate_queue_worker running. I believe this is a bug that can happen where this code path provides an interval of type string. With no workers running, such as rails server with no simulate queue worker: Go to: Overview->Reports->Reports accordion->Configuration->New Report Give it a name, title, "base the report on" such as availability zone, add a field such as Ems Ref to the selected fields. Then, click "preview" tab. Click "generate report preview" button... Before this change, it blows up with: [TypeError] no implicit conversion of Integer into String Note, this is a similar change as #9444
1 parent 4df991e commit 245d4a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/application_controller/wait_for_task.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def wait_for_task
1111
@edit = session[:edit] # If in edit, need to preserve @edit object
1212
raise Forbidden, _('Invalid input for "wait_for_task".') unless params[:task_id]
1313

14-
async_interval = params[:async_interval] || 1000 # Default interval to 1 second
14+
async_interval = params.fetch(:async_interval, 1000).to_i # Default interval to 1 second
1515

1616
task = MiqTask.find(params[:task_id].to_i)
1717
if task.state != "Finished" # Task not done --> retry

0 commit comments

Comments
 (0)