Opened 3 years ago

Closed 3 years ago

#21015 closed Bug (fixed)

MigrationLoader trips on file modules and empty directories called migrations.

Reported by: loic84 Owned by: Tim Graham <timograham@…>
Component: Migrations Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

  File "/Users/loic/Dev/django/django/db/migrations/loader.py", line 75, in load_disk
    directory = os.path.dirname(module.__file__)
AttributeError: 'module' object has no attribute '__file__'

Change History (3)

comment:1 Changed 3 years ago by loic84

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 3 years ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:3 Changed 3 years ago by Tim Graham <timograham@…>

Owner: set to Tim Graham <timograham@…>
Resolution: fixed
Status: newclosed

In e1266e50b29540c07a78ab6f544d9a5073ee8a58:

Fixed #21015 -- Fixed MigrationLoader when importlib.import_module returns a file module or an empty directory.

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