summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-05-29 13:47:49 -0400
committerTim Graham <timograham@gmail.com>2013-05-30 10:19:13 -0400
commit59235816bd063cb8b24acfc92ae1b5cd09a1f7ba (patch)
tree020866120dbb5249daa275c9c79f7e392fee5826 /django
parent69f7db153d8108dcef033207d49f4c80febf3d70 (diff)
Fixed #20509 - Proper parsing for dumpdata --pks option.
Thanks weipin for the report and Baptiste Mispelon for the patch.
Diffstat (limited to 'django')
-rw-r--r--django/core/management/commands/dumpdata.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/core/management/commands/dumpdata.py b/django/core/management/commands/dumpdata.py
index b1e06e4255..c5eb1b9a9e 100644
--- a/django/core/management/commands/dumpdata.py
+++ b/django/core/management/commands/dumpdata.py
@@ -21,8 +21,9 @@ class Command(BaseCommand):
help='Use natural keys if they are available.'),
make_option('-a', '--all', action='store_true', dest='use_base_manager', default=False,
help="Use Django's base manager to dump all models stored in the database, including those that would otherwise be filtered or modified by a custom manager."),
- make_option('--pks', dest='primary_keys', action='append', default=[],
- help="Only dump objects with given primary keys. Accepts a comma seperated list of keys. This option will only work when you specify one model."),
+ make_option('--pks', dest='primary_keys', help="Only dump objects with "
+ "given primary keys. Accepts a comma seperated list of keys. "
+ "This option will only work when you specify one model."),
)
help = ("Output the contents of the database as a fixture of the given "
"format (using each model's default manager unless --all is "
@@ -44,7 +45,7 @@ class Command(BaseCommand):
if pks:
primary_keys = pks.split(',')
else:
- primary_keys = False
+ primary_keys = []
excluded_apps = set()
excluded_models = set()