summaryrefslogtreecommitdiff
path: root/users/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/models')
-rw-r--r--users/app/models/token.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/users/app/models/token.rb b/users/app/models/token.rb
index bf9b0d0..001eb40 100644
--- a/users/app/models/token.rb
+++ b/users/app/models/token.rb
@@ -20,7 +20,8 @@ class Token < CouchRest::Model::Base
end
def self.expired
- self.by_last_seen_at.endkey(expires_after.minutes.ago)
+ return [] unless expires_after
+ by_last_seen_at.endkey(expires_after.minutes.ago)
end
def self.destroy_all_expired