fix!: dont delete customizations when doctypes are deleted #17009
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If someone deletes doctype and restores it back all customization are
lost, there's no "real" reason to delete all these customization. They
are only ever active if the doctype is being used.
Explanations:
isn't requested then the custom field is effectively inactive.
inactive in a deleted state.
present.
manually to avoid loss of "scripts" or anything special they might
have done. Also, report's doctype don't 100% indicate that it's based
solely on that doctype.
More unrelated fixes:
keyerror
delete_from_table
IDK any other error that occurs during routine usage with stale doctype/modules. If you find any point it out and we will handle it better 馃槄 basically: