diff options
author | Igor <idrozdov@gitlab.com> | 2019-08-28 21:09:22 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-28 21:09:22 +0000 |
commit | 8db6c4c6e770be30e3c49b842c501d66e427c4d9 (patch) | |
tree | c02bb87adac063768ff0b531d42e11b0c9f688de /app/serializers/merge_request_serializer.rb | |
parent | 1ca42a247923a8887a3684c08d5c7012a9177997 (diff) | |
download | gitlab-ce-8db6c4c6e770be30e3c49b842c501d66e427c4d9.tar.gz |
Reduce the number of SQL requests on MR-show
- Extract MR fields for notes into a separate serializer
- Check if pipelines are empty via count
Diffstat (limited to 'app/serializers/merge_request_serializer.rb')
-rw-r--r-- | app/serializers/merge_request_serializer.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/serializers/merge_request_serializer.rb b/app/serializers/merge_request_serializer.rb index bd2e682a122..aa67cd1f39e 100644 --- a/app/serializers/merge_request_serializer.rb +++ b/app/serializers/merge_request_serializer.rb @@ -13,6 +13,8 @@ class MergeRequestSerializer < BaseSerializer MergeRequestSidebarExtrasEntity when 'basic' MergeRequestBasicEntity + when 'noteable' + MergeRequestNoteableEntity else # fallback to widget for old poll requests without `serializer` set MergeRequestWidgetEntity |