Commit bad26e2d authored by Tiago Botelho's avatar Tiago Botelho

Small code refactoring for condition circuit breaking

Also adds Changelog entry
parent 4bd8a427
...@@ -22,7 +22,7 @@ class Projects::ImportsController < Projects::ApplicationController ...@@ -22,7 +22,7 @@ class Projects::ImportsController < Projects::ApplicationController
def show def show
if @project.import_finished? if @project.import_finished?
if continue_params && continue_params[:to] if continue_params&.key?(:to)
redirect_to continue_params[:to], notice: continue_params[:notice] redirect_to continue_params[:to], notice: continue_params[:notice]
else else
redirect_to project_path(@project), notice: finished_notice redirect_to project_path(@project), notice: finished_notice
......
...@@ -73,7 +73,7 @@ class ProjectImportState < ActiveRecord::Base ...@@ -73,7 +73,7 @@ class ProjectImportState < ActiveRecord::Base
alias_method :no_import?, :none? alias_method :no_import?, :none?
def in_progress? def in_progress?
started? || scheduled? scheduled? || started?
end end
def started? def started?
......
---
title: Removes all the irrelevant code and columns that were migrated from the Project
table over to the ProjectImportState table
merge_request: 21497
author:
type: performance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment