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
Updated by daviddavis about 3 years ago
- Subject changed from Modelresources incorrectly set widgets to Widget instead of JSONWidget to Modelresources incorrectly set json fields to use Widget instead of JSONWidget
Updated by daviddavis about 3 years ago
I filed an issue to ask for a new release of django-import-export: https://github.com/django-import-export/django-import-export/issues/1321
Updated by daviddavis about 3 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by pulpbot about 3 years ago
- Status changed from ASSIGNED to POST
Added by daviddavis about 3 years ago
Updated by daviddavis about 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|225360cabb3e563806234c869734c5965b824ec7.
Updated by daviddavis about 3 years ago
- Related to Issue #9324: Backport #9307 to 3.15 added
Updated by pulpbot about 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Set WIDGET_MAP for model resources to handle JSON fields
fixes #9307