mirror of
https://github.com/docusealco/docuseal.git
synced 2026-06-23 04:10:11 +00:00
fix expired filter
This commit is contained in:
@@ -101,7 +101,11 @@ class Submission < ApplicationRecord
|
||||
where(Submitter.where(Submitter.arel_table[:submission_id].eq(Submission.arel_table[:id])
|
||||
.and(Submitter.arel_table[:declined_at].not_eq(nil))).select(1).arel.exists)
|
||||
}
|
||||
scope :expired, -> { pending.where(expire_at: ..Time.current) }
|
||||
scope :expired, lambda {
|
||||
where(expire_at: ..Time.current)
|
||||
.where(Submitter.where(Submitter.arel_table[:submission_id].eq(Submission.arel_table[:id])
|
||||
.and(Submitter.arel_table[:completed_at].eq(nil))).select(1).arel.exists)
|
||||
}
|
||||
|
||||
enum :source, {
|
||||
invite: 'invite',
|
||||
|
||||
Reference in New Issue
Block a user