#29603 closed Bug (duplicate)
dumpdata shouldn't use allow_migrate_model
| Reported by: | Tommaso Barbugli | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 2.0 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The dumpdata management command uses router.allow_migrate_model to determine whether the dump should be done or not (in dumpdata's Command.get_objects method). This is clearly not the right thing to do since that function is used to determined whether a migration should be performed or not.
Note: this check is performed even if the command has a database specified.
Ideally we'd extend router's interface to have an 'allow_dump_data' method rather than use an existing method that serves a different purpose.
Change History (2)
comment:1 by , 7 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
| Type: | Uncategorized → Bug |
comment:2 by , 7 years ago
| Summary: | dumpdata management command database router usage → dumpdata shouldn't use allow_migrate_model |
|---|
Note:
See TracTickets
for help on using tickets.
Duplicate of #21906.