Removed unneeded field_name checks within MigrationAutodetector.check_dependency(). #19598
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.
While testing #19361, I was checking whether the elif check could be simplified to check test coverage and make sure we don't add anything unnecessary.
There are some
OperationDependency.Type
which are used for changes to both models and fields (such asOperationDependency.Type.CREATE
) and some that are currently only used for changes to fields (such asOperationDependency.Type.REMOVE_ORDER_WRT
).I want to confirm if always checking whether the field name is or isn't None is something we want by design or whether a small refactor is worthwhile.
This might be just a personal preference decision but thought I would ask 👍