diff options
Diffstat (limited to 'lib/api/admin/batched_background_migrations.rb')
-rw-r--r-- | lib/api/admin/batched_background_migrations.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/admin/batched_background_migrations.rb b/lib/api/admin/batched_background_migrations.rb index 7e612b5b66a..c0d1ce8767d 100644 --- a/lib/api/admin/batched_background_migrations.rb +++ b/lib/api/admin/batched_background_migrations.rb @@ -142,9 +142,12 @@ module API @base_model ||= Gitlab::Database.database_base_models[database] end + # Force progress evaluation to occur now while we're using the right connection def present_entity(result) - present result, - with: ::API::Entities::BatchedBackgroundMigration + representation = entity_representation_for(::API::Entities::BatchedBackgroundMigration, result, {}) + json_representation = Gitlab::Json.dump(representation) + + body Gitlab::Json::PrecompiledJson.new(json_representation) end end end |