Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
541570bc
Commit
541570bc
authored
Nov 27, 2018
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small code refactoring for condition circuit breaking
Also adds Changelog entry
parent
15ebe4d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
app/controllers/projects/imports_controller.rb
app/controllers/projects/imports_controller.rb
+1
-1
app/models/project_import_state.rb
app/models/project_import_state.rb
+1
-1
changelogs/unreleased/50341-cleanup-useless-project-import-attributes.yml
...eased/50341-cleanup-useless-project-import-attributes.yml
+6
-0
No files found.
app/controllers/projects/imports_controller.rb
View file @
541570bc
...
@@ -23,7 +23,7 @@ class Projects::ImportsController < Projects::ApplicationController
...
@@ -23,7 +23,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
...
...
app/models/project_import_state.rb
View file @
541570bc
...
@@ -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?
s
tarted?
||
schedul
ed?
s
cheduled?
||
start
ed?
end
end
def
started?
def
started?
...
...
changelogs/unreleased/50341-cleanup-useless-project-import-attributes.yml
0 → 100644
View file @
541570bc
---
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment