Use central method for appending legaldocs to domains/contacts

This commit is contained in:
Karl Erik Õunapuu 2020-12-29 15:21:03 +02:00
parent 7caa544c83
commit 50bf708b6a
No known key found for this signature in database
GPG key ID: C9DD647298A34764
10 changed files with 61 additions and 73 deletions

View file

@ -23,15 +23,7 @@ module Actions
end
def maybe_attach_legal_doc
return unless legal_document
document = contact.legal_documents.create(
document_type: legal_document[:type],
body: legal_document[:body]
)
contact.legal_document_id = document.id
contact.save
Actions::BaseAction.maybe_attach_legal_doc(contact, legal_document)
end
def commit