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
765d57d6
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
lib/gitlab/current_settings.rb
lib/gitlab/current_settings.rb
+3
-3
lib/gitlab/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