Opened 71 minutes ago

Last modified 49 minutes ago

#37081 assigned Bug

loaddata fails when a directory in the fixture path contains a dot

Reported by: Alisson Silveira Owned by: Alisson Silveira
Component: Core (Management commands) Version: 6.0
Severity: Normal Keywords:
Cc: Alisson Silveira Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

How to reproduce:

Create a fixture in a directory containing a dot, for example:

fixtures/fix.v1/data.json

Run (without specifying the file extension):

python manage.py loaddata fixtures/fix.v1/data

This raises:

CommandError: Problem installing fixture 'fixtures/fix': v1/data is not a known serialization format.

This occurs when a directory in the fixture path contains a dot, as the full path is incorrectly split on "." instead of operating on the file name.

Expected behavior: Django should correctly determine the fixture format based on the file name and load the fixture successfully, ignoring dots in directory names.

A fix has been identified and will be submitted in a pull request.

Change History (1)

comment:1 by Alisson Silveira, 49 minutes ago

Owner: set to Alisson Silveira
Status: newassigned
Note: See TracTickets for help on using tickets.
Back to Top