Matt Hegarty
Matt Hegarty
The reference to `self.model` comes from the model reference passed to the Widget. Please check you have declared this correctly. For example, ``` class BookResource(resources.ModelResource): author = fields.Field( column_name='author', attribute='author',...
> Line number: 3 - NOT NULL constraint failed: [this comment](https://github.com/django-import-export/django-import-export/issues/1410#issuecomment-1088934294) may help.
It's not supported in the core release, but there is a PR [here](https://github.com/django-import-export/django-import-export/pull/1394) which may help you achieve this.
I would only say to be careful about potentially undertaking a ton of work. This would be a great feature, but I can imagine it will be tricky to implement....
Hi Yes it gets tested on build using [tox](https://github.com/django-import-export/django-import-export/blob/main/tox.ini) with latest django version and on python 3.10. Import of many to many fields is supported. I suggest use the [3.0...
I'm getting the following when testing this, which could be another issue. It's automatically assuming that there will be a 'categories' field in the dataset because it's auto-detected a ManyToManyField....
It does try to import each field by default if it is not declared in the `fields` list.
I can reproduce your original issue now - working on a test.
Have got a failing test [here](https://github.com/matthewhegarty/django-import-export/tree/test-issue-1437-skip-row-not-consistent). Still some work to do.
This is a tricky issue caused when we have a CharField declared with `null=True` (which Django docs state should be [avoided](https://docs.djangoproject.com/en/dev/ref/models/fields/#null)). In that case, the value of the `original` object...