Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ai/service_access_token.rb')
-rw-r--r--app/models/ai/service_access_token.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ai/service_access_token.rb b/app/models/ai/service_access_token.rb
index 863bdfc7899..b8a2a271976 100644
--- a/app/models/ai/service_access_token.rb
+++ b/app/models/ai/service_access_token.rb
@@ -5,6 +5,7 @@ module Ai
self.table_name = 'service_access_tokens'
scope :expired, -> { where('expires_at < :now', now: Time.current) }
+ scope :active, -> { where('expires_at > :now', now: Time.current) }
scope :for_category, ->(category) { where(category: category) }
attr_encrypted :token,