diff options
Diffstat (limited to 'app/serializers/merge_request_widget_entity.rb')
-rw-r--r-- | app/serializers/merge_request_widget_entity.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb index eda7a36c2ee..2a81931c49f 100644 --- a/app/serializers/merge_request_widget_entity.rb +++ b/app/serializers/merge_request_widget_entity.rb @@ -3,6 +3,9 @@ class MergeRequestWidgetEntity < Grape::Entity include RequestAwareEntity + expose :id + expose :iid + expose :source_project_full_path do |merge_request| merge_request.source_project&.full_path end @@ -65,6 +68,8 @@ class MergeRequestWidgetEntity < Grape::Entity end def as_json(options = {}) + return super(options) if Feature.enabled?(:async_mr_widget) + super(options) .merge(MergeRequestPollCachedWidgetEntity.new(object, **@options.opts_hash).as_json(options)) .merge(MergeRequestPollWidgetEntity.new(object, **@options.opts_hash).as_json(options)) |