Open benzkji opened 2 months ago
This issue arose during #727 and #729
Probably, yes. We expect there a model, not a string.
But in this edge case, it is a string. Nothing special, or do you see something special in my example code? Defining foreign key field's models as strings is supported and sometimes necessary, in Django, so shouldn't it be with modeltranslation?
That looks like error, or maybe we're accessing it at the wrong time (during init).
If you look at any other foreign key, field.model
is a model class, even if it's string in the definition.
Agreed. Hard to tackle down. It's really only when in an abstract base class.
Somehow the field.model is not yet a class, but still a string, in this particular case.
Tried a fix (modeltranslation/fields.py), but issue seems deeper, I guess it should really just not be a string?
This PR just shows the problem.