liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dumpscript fails when there is no manager called 'objects'

GoogleCodeExporter opened this issue · comments

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