class Contact(RootModel):
categories = fields.ManyToManyField('core.ContactCategory', related_name='contacts', through='fkcontactcategory',
description="Categories", on_delete=fields.SET_NULL)
I set null=False on the field.
categories = fields.ManyToManyField('core.ContactCategory', related_name='contacts', null=False, through='fkcontactcategory', description="Categories", on_delete=fields.SET_NULL)
When performing the migration using command.migrate(app_name) I run into an error:
'bool' object is not subscriptable
I have a m2m field as follows:
class Contact(RootModel): categories = fields.ManyToManyField('core.ContactCategory', related_name='contacts', through='fkcontactcategory', description="Categories", on_delete=fields.SET_NULL)
I set null=False on the field. categories = fields.ManyToManyField('core.ContactCategory', related_name='contacts', null=False, through='fkcontactcategory', description="Categories", on_delete=fields.SET_NULL)
When performing the migration using command.migrate(app_name) I run into an error: 'bool' object is not subscriptable
Any help would be appreciated.