mirror of
https://github.com/docusealco/docuseal
synced 2026-11-07 23:32:33 -05:00
add completed download scope
This commit is contained in:
1 parent
09310f3690
commit
b9018fa442
1 file changed
+2
-2
@@ -17,11 +17,11 @@ class SubmitFormCompletedDownloadController < ApplicationController
|
|||||||
@submitter = nil
|
@submitter = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
@submitter ||= Submitter.find_by!(slug: submitter_slug)
|
@submitter ||= Submitter.completed.find_by!(slug: submitter_slug)
|
||||||
|
|
||||||
Submissions::EnsureResultGenerated.call(@submitter) if @submitter.completed_at?
|
Submissions::EnsureResultGenerated.call(@submitter) if @submitter.completed_at?
|
||||||
|
|
||||||
last_submitter = @submitter.submission.submitters.where.not(completed_at: nil).order(:completed_at).last
|
last_submitter = @submitter.submission.submitters.completed.order(:completed_at).last
|
||||||
|
|
||||||
return head :not_found unless last_submitter
|
return head :not_found unless last_submitter
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user