Opened 5 years ago

Closed 5 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


When running:

$ python dumpdata  blogapp blogapp.Tag

I get:

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

A fix is in this pull request:

Change History (4)

comment:1 Changed 5 years ago by Baptiste Mispelon

Needs tests: set
Triage Stage: UnreviewedAccepted


I can indeed reproduce the issue.

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


comment:2 Changed 5 years ago by anonymous

Added a test in the pull request.

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

Replying to anonymous:

Added a test in the pull request.

Sorry, logged in now.

comment:4 Changed 5 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 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