liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

dumpscript fails when there is no manager called 'objects' #105

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
`dumpscript` command fails when any application model does not have a
manager named objects.

Changing line 144 of dumpscript.py from this:
    for counter, item in enumerate(self.model.objects.all()):
To this:
    for counter, item in enumerate(self.model._default_manager.all()):

Fixes this issue.  I have attached a diff with this change.

Original issue reported on code.google.com by dnsa...@gmail.com on 4 Jun 2009 at 7:49

Attachments: