Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-07 21:08:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-07 21:08:08 +0300
commit59f37a99433dbdc3093e06f0f57beff171bae5d4 (patch)
tree61f7e6c66fd79fda1ec46b223225012241eff3e7 /lib/gitlab/json.rb
parentfa4473a48706d074217f4ffc8d183cf630af1833 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/json.rb')
-rw-r--r--lib/gitlab/json.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/gitlab/json.rb b/lib/gitlab/json.rb
index 2c9b79bfc9d..d248ad2eeca 100644
--- a/lib/gitlab/json.rb
+++ b/lib/gitlab/json.rb
@@ -167,23 +167,11 @@ module Gitlab
# @return [Boolean, String, Array, Hash, Object]
# @raise [JSON::ParserError]
def handle_legacy_mode!(data)
- return data unless feature_table_exists?
+ return data unless Feature.feature_flags_available?
return data unless Feature.enabled?(:json_wrapper_legacy_mode)
raise parser_error if INVALID_LEGACY_TYPES.any? { |type| data.is_a?(type) }
end
-
- # There are a variety of database errors possible when checking the feature
- # flags at the wrong time during boot, e.g. during migrations. We don't care
- # about these errors, we just need to ensure that we skip feature detection
- # if they will fail.
- #
- # @return [Boolean]
- def feature_table_exists?
- Feature::FlipperFeature.table_exists?
- rescue StandardError
- false
- end
end
# GrapeFormatter is a JSON formatter for the Grape API.