Skip to content

Commit 92f13b0

Browse files
pandafynemesifier
authored andcommitted
[chores] Do not allow selecting columns when exporting devices
The django-export-import dependency was upgraded in openwisp-controller which now allows selecting the columns during export operation. Since this can cause issues during import of files with limited fields, we decided to rollback to the old implementation which exports all the fields of the device model. Related openwisp/openwisp-controller#915
1 parent 452a5e8 commit 92f13b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

openwisp_monitoring/device/admin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from django.utils.safestring import mark_safe
1515
from django.utils.translation import gettext_lazy as _
1616
from import_export.admin import ImportExportMixin
17+
from import_export.forms import ExportForm
1718
from nested_admin.nested import (
1819
NestedGenericStackedInline,
1920
NestedModelAdmin,
@@ -370,6 +371,7 @@ def get_inlines(self, request, obj=None):
370371

371372

372373
class DeviceAdminExportable(ImportExportMixin, DeviceAdmin):
374+
export_form_class = ExportForm
373375
resource_class = DeviceMonitoringResource
374376
# Added to support both reversion and import-export
375377
change_list_template = 'admin/config/change_list_device.html'

0 commit comments

Comments
 (0)