Opened 4 years ago

Closed 4 years ago

#22025 closed Bug (fixed)

TypeError in the dumpdata command when listing "app app.Model"

Reported by: eliben@… Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When running:

$ python manage.py dumpdata  blogapp blogapp.Tag

I get:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  ...
  ...
TypeError: argument of type 'NoneType' is not iterable

A fix is in this pull request: https://github.com/django/django/pull/2262

Change History (4)

comment:1 Changed 4 years ago by Baptiste Mispelon

Needs tests: set
Triage Stage: UnreviewedAccepted

Hi,

I can indeed reproduce the issue.

The pull request looks reasonable but you'll need to add some tests for it to be merged.

Thanks

comment:2 Changed 4 years ago by anonymous

Added a test in the pull request.

comment:3 in reply to:  2 Changed 4 years ago by eliben

Replying to anonymous:

Added a test in the pull request.

Sorry, logged in now.

comment:4 Changed 4 years ago by Baptiste Mispelon <bmispelon@…>

Resolution: fixed
Status: newclosed

In 73f51e411372ba3e74ccf5a2c2be88927ac2c6dd:

Fixed #22025 -- Listing app followed by app.Model in dumpdata command

When invoked as follows:

$ python manage.py dumpdata blogapp blogapp.Tag

Django would throw a TypeError. This commit fixes the problem and provides
a test.

Note: See TracTickets for help on using tickets.
Back to Top