Use any? instead of count > 0, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019#note_16832243
This commit is contained in:
parent
94611607e5
commit
f1e5ca3a31
2 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ class BuildsEmailService < Service
|
|||
end
|
||||
|
||||
def can_test?
|
||||
project.builds.count > 0
|
||||
project.builds.any?
|
||||
end
|
||||
|
||||
def disabled_title
|
||||
|
|
|
@ -39,7 +39,7 @@ class PipelinesEmailService < Service
|
|||
end
|
||||
|
||||
def can_test?
|
||||
project.pipelines.count > 0
|
||||
project.pipelines.any?
|
||||
end
|
||||
|
||||
def disabled_title
|
||||
|
|
Loading…
Reference in a new issue