BigW Consortium Gitlab

Commit 8753635c by Grzegorz Bizon

Use `#present?` instead of `defined?` in serializers

parent e4cb073b
...@@ -16,7 +16,7 @@ class EnvironmentSerializer < BaseSerializer ...@@ -16,7 +16,7 @@ class EnvironmentSerializer < BaseSerializer
end end
def paginated? def paginated?
defined?(@paginator) @paginator.present?
end end
def represent(resource, opts = {}) def represent(resource, opts = {})
......
...@@ -8,7 +8,7 @@ class PipelineSerializer < BaseSerializer ...@@ -8,7 +8,7 @@ class PipelineSerializer < BaseSerializer
end end
def paginated? def paginated?
defined?(@paginator) @paginator.present?
end end
def represent(resource, opts = {}) def represent(resource, opts = {})
......
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