Opened 10 years ago
Last modified 10 years ago
#26316 closed Cleanup/optimization
Remove repetition of code in migrations.operations.models — at Initial Version
| Reported by: | Akshesh Doshi | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
The following method repeats 7 times in django.db.migations.operations.models:
def references_model(self, name, app_label=None):
return name.lower() == self.name_lower
I think it should be taken up to ModelOperation (or Operation maybe).
Note:
See TracTickets
for help on using tickets.