`GenericForeignKey` not accounted for in `baker._skip_field()`
paduszyk opened this issue · 4 comments
paduszyk commented
When trying to bake a model with mandatory generic relation and set _fill_optional=True
at the same time, I get AttributeError
due to invalid reference to generic FK field's null
attribute.
If I add GenericForeignKey
to the tuple ref. below (followed by its import, of course), the problem disappears.
model_bakery/model_bakery/baker.py
Line 571 in 75735ff
I guess the problem is that generic FK is identified as nullable, thus optional... Anyone can explain why this has not been done yet?