mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
return 422 when submit archived submission
This commit is contained in:
1 parent
e558f4d9fb
commit
203f4633f7
2 files changed
+7
-1
No files matched your search
@@ -42,6 +42,12 @@ class SubmitFormController < ApplicationController
|
||||
return render json: { error: 'Form has been completed already.' }, status: :unprocessable_entity
|
||||
end
|
||||
|
||||
if submitter.template.deleted_at? || submitter.submission.deleted_at?
|
||||
Rollbar.info("Archived template: #{submitter.template.id}") if defined?(Rollbar)
|
||||
|
||||
return render json: { error: 'Form has been archived.' }, status: :unprocessable_entity
|
||||
end
|
||||
|
||||
Submitters::SubmitValues.call(submitter, params, request)
|
||||
|
||||
head :ok
|
||||
|
||||
Reference in new issue
Block a user