summaryrefslogtreecommitdiff
path: root/app/serializers/pipeline_serializer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/pipeline_serializer.rb')
-rw-r--r--app/serializers/pipeline_serializer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb
index 3205578b83e..4f31af3c46d 100644
--- a/app/serializers/pipeline_serializer.rb
+++ b/app/serializers/pipeline_serializer.rb
@@ -4,6 +4,7 @@ class PipelineSerializer < BaseSerializer
include WithPagination
entity PipelineDetailsEntity
+ # rubocop: disable CodeReuse/ActiveRecord
def represent(resource, opts = {})
if resource.is_a?(ActiveRecord::Relation)
resource = resource.preload([
@@ -33,6 +34,7 @@ class PipelineSerializer < BaseSerializer
super(resource, opts)
end
+ # rubocop: enable CodeReuse/ActiveRecord
def represent_status(resource)
return {} unless resource.present?