diff --git a/app/models/submission.rb b/app/models/submission.rb index ef40ef68..f448adcd 100644 --- a/app/models/submission.rb +++ b/app/models/submission.rb @@ -71,7 +71,7 @@ class Submission < ApplicationRecord .and(Submitter.arel_table[:completed_at].eq(nil))).select(1).arel.exists) } scope :declined, -> { joins(:submitters).where.not(submitters: { declined_at: nil }).group(:id) } - scope :expired, -> { where(expire_at: ..Time.current) } + scope :expired, -> { pending.where(expire_at: ..Time.current) } enum :source, { invite: 'invite', diff --git a/app/views/templates/_submission.html.erb b/app/views/templates/_submission.html.erb index f7bc7a83..5d75a047 100644 --- a/app/views/templates/_submission.html.erb +++ b/app/views/templates/_submission.html.erb @@ -34,7 +34,7 @@ <% submitter = submitters.first %>