Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#13308 closed (fixed)

dumpdata doesn't honor router information

Reported by: russellm Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2-beta
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Reported by wizard_2/Francis on django-users:

loaddata uses router.allow_syncdb() to determine whether an object should be loaded from a fixture. dumpdata, however, doesn't do the same when outputting a fixture. This can lead to "Table doesn't exist" database errors when a router indicates that a specific model shouldn't be available on a given database, but dumpdata tries to dump the model anyway.

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [12940]) Fixed #13308 -- Ensured that dumpdata correctly interacts with router allow_syncdb directions. Thanks to Francis (wizard_2) for the report.

comment:3 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.