Skip to content

Commit

Permalink
remove submitter signature assoc
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed Jun 15, 2024
1 parent f9d52e5 commit 009e055
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions app/models/submitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ class Submitter < ApplicationRecord
has_many_attached :documents
has_many_attached :attachments

has_one_attached :signature

has_many :document_generation_events, dependent: :destroy
has_many :submission_events, dependent: :destroy

Expand Down
9 changes: 0 additions & 9 deletions lib/submitters/submit_values.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ def assign_completed_attributes(submitter, request)
v == '{{date}}' ? Time.current.in_time_zone(submitter.account.timezone).to_date.to_s : v
end

signature_attachment =
submitter.submission.template_fields.reduce(nil) do |_, field|
next nil if field['submitter_uuid'] != submitter.uuid || field['type'] != 'signature'

break submitter.attachments_attachments.find_by(uuid: submitter.values[field['uuid']])
end

submitter.build_signature_attachment(blob_id: signature_attachment.blob_id) if signature_attachment

submitter
end

Expand Down

0 comments on commit 009e055

Please sign in to comment.