Actions
Issue #9307
closedModelresources incorrectly set json fields to use Widget instead of JSONWidget
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
See for example:
In [1]: from pulp_rpm.app.modelresource import PackageCategoryResource
In [2]: PackageCategoryResource.fields["group_ids"].__dict__
Out[2]:
{'attribute': 'group_ids',
'default': list,
'column_name': 'group_ids',
'widget': <import_export.widgets.Widget at 0x7f032a86aeb0>,
'readonly': False,
'saves_null_values': True}
This is caused by django-import-export not properly handling django.db.models.JSONField
. In django-import-export 2.5.0 it only checks for django.contrib.postgres.fields.JSONField
.
The fix is here but it hasn't been released yet:
Related issues
Actions
Set WIDGET_MAP for model resources to handle JSON fields
fixes #9307