Skip to content

Commit

Permalink
Set refresh on Tasks show page only if active Run
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianna-chang-shopify committed Jan 21, 2021
1 parent f3332a7 commit 9325757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/maintenance_tasks/tasks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module MaintenanceTasks
#
# @api private
class TasksController < ApplicationController
before_action :set_refresh, only: [:index, :show]
before_action :set_refresh, only: [:index]

# Renders the maintenance_tasks/tasks page, displaying
# available tasks to users, grouped by category.
Expand All @@ -19,7 +19,7 @@ def index
# Shows running and completed instances of the Task.
def show
@task = TaskData.find(params.fetch(:id))
set_refresh if @task.last_run.active?
set_refresh if @task.last_run&.active?
@pagy, @previous_runs = pagy(@task.previous_runs)
end

Expand Down

0 comments on commit 9325757

Please sign in to comment.