Closed igiyazov closed 4 months ago
I speculate that it may be a collision of the field name 'check' with a method of the model bearing the same name.
This has happened to me in the past and I have not found a better solution other than to change the field name or prefix it with a _ (undescore)
EDIT: related to #1559
Your example should work in 0.21.0 as check
is not reserved anymore
I have models:
Code above issue:
And when I change name of field
check
inProduct
model to any other, everything work.E.g.:
bill = fields.ForeignKeyField( 'models.Check', related_name='products', null=True, on_delete=fields.SET_NULL, default=None )
What's wrong I do?