Opened 9 years ago
Last modified 9 years ago
#26316 closed Cleanup/optimization
Remove repetition of code in migrations.operations.models — at Version 1
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 (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 (1)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|---|
Easy pickings: | set |
Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
I think we should implement
ModelOperation.references_model
,FieldOperation.references_model
andFieldOperation.references_field
.