1
0
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:
Malcolm Tredinnick
2007-12-17 09:09:08 +00:00
parent 06482d4aa4
commit 3edf2ebd94
2 changed files with 8 additions and 1 deletions

View File

@@ -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: