Small code refactoring for condition circuit breaking

Also adds Changelog entry
上级 4bd8a427
......@@ -22,7 +22,7 @@ class Projects::ImportsController < Projects::ApplicationController
def show
if @project.import_finished?
if continue_params && continue_params[:to]
if continue_params&.key?(:to)
redirect_to continue_params[:to], notice: continue_params[:notice]
else
redirect_to project_path(@project), notice: finished_notice
......
......@@ -73,7 +73,7 @@ class ProjectImportState < ActiveRecord::Base
alias_method :no_import?, :none?
def in_progress?
started? || scheduled?
scheduled? || started?
end
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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册