diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-06 16:47:19 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-06 16:47:19 +0200 |
commit | 603ceea21a0144ff1900106efa0c17e759eeceef (patch) | |
tree | 70a931af89834516544ec6769f827dadd7f62c10 /lib/api | |
parent | b28714b6a9bf71fac64a0423091fb7eab244fd7f (diff) | |
download | gitlab-ce-603ceea21a0144ff1900106efa0c17e759eeceef.tar.gz |
Add tests and improve logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/settings.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/settings.rb b/lib/api/settings.rb index 4aa81bf8bab..c885fcd7ea3 100644 --- a/lib/api/settings.rb +++ b/lib/api/settings.rb @@ -4,7 +4,8 @@ module API helpers do def current_settings - @current_setting ||= ApplicationSetting.current + @current_setting ||= + (ApplicationSetting.current || ApplicationSetting.create_from_defaults) end end |