Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dpp): document factory wouldn't allow delete transitions for immutable document types #1956

Conversation

pauldelucia
Copy link
Member

Issue being fixed or feature implemented

DocumentFactoryV0 and SpecializedDocumentFactoryV0 were not allowing to create delete transitions if not document_type.documents_mutable(), but it should have been checking document_type.documents_can_be_deleted().

What was done?

Changed the check and wrote a test. Also renamed the error message about not being able to delete immutable documents.

How Has This Been Tested?

Wrote a test for deleting immutable but deletable document types.

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@QuantumExplorer QuantumExplorer merged commit 09142c1 into v1.0-dev Jul 15, 2024
28 of 45 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/immutable-documents-couldnt-be-deleted-in-factory branch July 15, 2024 13:12
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.

2 participants