BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
765d57d6
Unverified
Commit
765d57d6
authored
Jan 23, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rescue from ActiveRecord::UnknownAttributeError and fallback to fake settings
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
632c2939
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
current_settings.rb
lib/gitlab/current_settings.rb
+3
-3
import_sources.rb
lib/gitlab/import_sources.rb
+0
-2
No files found.
lib/gitlab/current_settings.rb
View file @
765d57d6
...
...
@@ -30,15 +30,15 @@ module Gitlab
end
def
in_memory_application_settings
@in_memory_application_settings
||=
ApplicationSetting
.
new
(
ApplicationSetting
::
DEFAULTS
)
@in_memory_application_settings
||=
::
ApplicationSetting
.
new
(
::
ApplicationSetting
::
DEFAULTS
)
# In case migrations the application_settings table is not created yet,
# we fallback to a simple OpenStruct
rescue
ActiveRecord
::
StatementInvalid
rescue
ActiveRecord
::
StatementInvalid
,
ActiveRecord
::
UnknownAttributeError
fake_application_settings
end
def
fake_application_settings
OpenStruct
.
new
(
ApplicationSetting
::
DEFAULTS
)
OpenStruct
.
new
(
::
ApplicationSetting
::
DEFAULTS
)
end
private
...
...
lib/gitlab/import_sources.rb
View file @
765d57d6
...
...
@@ -5,8 +5,6 @@
#
module
Gitlab
module
ImportSources
extend
CurrentSettings
ImportSource
=
Struct
.
new
(
:name
,
:title
,
:importer
)
ImportTable
=
[
...
...
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