Commit ad966830 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'sh-fix-feature-flag-check-api' into 'master'

Fix feature flag check failing when database is empty

See merge request gitlab-org/gitlab!46056
parents 333a9b5c b61cda1c
......@@ -118,7 +118,7 @@ module API
# There is a small chance some users depend on the old behavior.
# We this change under a feature flag to see if affects GitLab.com users.
if Feature.enabled?(:api_json_content_type)
if Gitlab::Database.cached_table_exists?('features') && Feature.enabled?(:api_json_content_type)
content_type :json, 'application/json'
else
content_type :txt, 'text/plain'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment