mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #6155 -- Fixed dumpdata to work with the default model manager (necessary
for the rare cases when the 'objects' manager might not even exist). Based on a patch from Michael Trier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -38,7 +38,7 @@ class Command(BaseCommand):
|
||||
objects = []
|
||||
for app in app_list:
|
||||
for model in get_models(app):
|
||||
objects.extend(model.objects.all())
|
||||
objects.extend(model._default_manager.all())
|
||||
try:
|
||||
return serializers.serialize(format, objects, indent=indent)
|
||||
except Exception, e:
|
||||
|
||||
Reference in New Issue
Block a user