mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 00:08:50 +01:00
Merge pull request #2212 from TracksApp/exists-instead-of-empty
Prefer !exists? over empty?
This commit is contained in:
commit
d180acb88a
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ class Project < ApplicationRecord
|
|||
def stalled?
|
||||
# Stalled projects are active projects with no active next actions
|
||||
return false if self.completed? || self.hidden?
|
||||
return self.todos.deferred_or_blocked.empty? && self.todos.active.empty?
|
||||
return !self.todos.deferred_or_blocked.exists? && !self.todos.active.exists?
|
||||
end
|
||||
|
||||
def shortened_name(length=40)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue