mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
handle template archived
This commit is contained in:
1 parent
7784346a97
commit
28f47e1093
3 files changed
+12
No files matched your search
@@ -75,6 +75,10 @@ module Mcp
|
||||
|
||||
return { content: [{ type: 'text', text: 'Template not found' }], isError: true } unless template
|
||||
|
||||
if template.archived_at?
|
||||
return { content: [{ type: 'text', text: 'Template has been archived' }], isError: true }
|
||||
end
|
||||
|
||||
current_ability.authorize!(:create, Submission.new(template:, account_id: current_user.account_id))
|
||||
|
||||
return { content: [{ type: 'text', text: 'Template has no fields' }], isError: true } if template.fields.blank?
|
||||
|
||||
Reference in new issue
Block a user