Opened 10 years ago
Closed 10 years ago
#26316 closed Cleanup/optimization (fixed)
Remove repetition of code in migrations.operations.models
| Reported by: | Akshesh Doshi | Owned by: | Akshesh Doshi |
|---|---|---|---|
| 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 (last modified by )
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).
Change History (3)
comment:1 by , 10 years ago
| Description: | modified (diff) |
|---|---|
| Easy pickings: | set |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
| Has patch: | set |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.
I think we should implement
ModelOperation.references_model,FieldOperation.references_modelandFieldOperation.references_field.