fix reason field
This commit is contained in:
@@ -45,8 +45,8 @@ module Submitters
|
|||||||
assign_completed_attributes(submitter, request, validate_required:) if params[:completed] == 'true'
|
assign_completed_attributes(submitter, request, validate_required:) if params[:completed] == 'true'
|
||||||
|
|
||||||
ApplicationRecord.transaction do
|
ApplicationRecord.transaction do
|
||||||
maybe_set_signature_reason!(values, submitter, params)
|
reason_field = maybe_set_signature_reason!(values, submitter, params)
|
||||||
validate_values!(values, submitter, params, request)
|
validate_values!(reason_field ? values.except(reason_field['uuid']) : values, submitter, params, request)
|
||||||
|
|
||||||
if (touch_attachment_uuid = params[:touch_attachment_uuid].presence)
|
if (touch_attachment_uuid = params[:touch_attachment_uuid].presence)
|
||||||
ActiveStorage::Attachment.where(uuid: touch_attachment_uuid, record: submitter).touch_all(:created_at)
|
ActiveStorage::Attachment.where(uuid: touch_attachment_uuid, record: submitter).touch_all(:created_at)
|
||||||
@@ -119,6 +119,8 @@ module Submitters
|
|||||||
end
|
end
|
||||||
|
|
||||||
submitter.submission.save!
|
submitter.submission.save!
|
||||||
|
|
||||||
|
reason_field
|
||||||
end
|
end
|
||||||
|
|
||||||
def normalized_values(params)
|
def normalized_values(params)
|
||||||
|
|||||||
Reference in New Issue
Block a user