Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@OlegPhenomenon
Copy link
Contributor

@OlegPhenomenon OlegPhenomenon commented Jan 2, 2026

Changed LegalDocument.create to .new in Actions::BaseAction to prevent duplicate file writes. Previously, the document was saved twice: once explicitly via create() and again when the parent entity (Contact/Domain) was saved, triggering the before_save callback twice and creating two files on the filesystem with only one linked in the database. Added integration tests to verify single file creation for both contact and domain creation with legal documents.

close #336

Changed LegalDocument.create to .new in Actions::BaseAction to prevent
duplicate file writes. Previously, the document was saved twice: once
explicitly via create() and again when the parent entity (Contact/Domain)
was saved, triggering the before_save callback twice and creating two
files on the filesystem with only one linked in the database.
Added integration tests to verify single file creation for both contact
and domain creation with legal documents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two identical legaldocs created with contact_create and domain_create

2 participants