Breaks when trying to refer to a model defined later in models.py
Bug #613817 reported by
Daniel Abel
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
django-sortedm2m |
New
|
Undecided
|
Unassigned |
Bug Description
in create_
AssertionError: ForeignKey(None) is invalid. First parameter to ForeignKey must be either a model, a model name, or the string 'self'
Is there any chance this can be fixed?
(A workaround can be to structure one's models.py so that models don't reference modelclasses defined later on, but that might be hard / impossible)
To post a comment you must log in.
Oh yes, and if this can't be fixed, then it should be documented.