Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#11286 closed (fixed)

Dumpdata management command does not use _default_manager

Reported by: mremolt Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In django/core/management/commands/dumpdata.py on line 75f:

for model in model_list:
    objects.extend(model.objects.all())

As I understand it, Django core now exclusively uses model_default_manager instead of the hard coded model.objects, so there is no reason to keep is here.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by kmtracey

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

This does seem to be an inadvertent regression of an earlier fix, as noted here:

http://code.djangoproject.com/ticket/6155#comment:6

comment:2 Changed 5 years ago by russellm

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

(In [10967]) Fixed #11286 -- Ensured that dumpdata uses the default manager, rather than always using the manager called objects. Thanks to Marc Remolt for the report.

comment:3 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 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.