diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-07 21:08:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-07 21:08:08 +0300 |
commit | 59f37a99433dbdc3093e06f0f57beff171bae5d4 (patch) | |
tree | 61f7e6c66fd79fda1ec46b223225012241eff3e7 /lib/gitlab/json.rb | |
parent | fa4473a48706d074217f4ffc8d183cf630af1833 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/json.rb')
-rw-r--r-- | lib/gitlab/json.rb | 14 |
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. |