Skip to content

Commit ca2cace

Browse files
committed
[fix] Fixed the order of inline admins
1 parent 3ab6996 commit ca2cace

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

openwisp_controller/config/migrations/0064_remove_organizationconfigsettings_estimated_location_enabled_and_more.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ class Migration(migrations.Migration):
99
"config",
1010
"0063_organizationconfigsettings_estimated_location_enabled_and_more",
1111
),
12+
# This dependency on the geo app is required to ensure that
13+
# the data from OrganizationConfigSettings is properly migrated to GeoSettings
14+
# before we remove the field.
1215
("geo", "0006_create_geo_settings_for_existing_orgs"),
1316
]
1417

openwisp_controller/geo/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
from ..admin import MultitenantAdminMixin
2020
from ..config.admin import (
21+
ConfigSettingsInline,
2122
DeactivatedDeviceReadOnlyMixin,
2223
DeviceAdminExportable,
23-
OrganizationLimitsInline,
2424
)
2525
from .estimated_location.service import EstimatedLocationService
2626
from .exportable import GeoDeviceResource
@@ -227,7 +227,7 @@ def get_readonly_fields(self, request, obj=None):
227227

228228

229229
OrganizationAdmin.inlines.insert(
230-
OrganizationAdmin.inlines.index(OrganizationLimitsInline) + 1,
230+
OrganizationAdmin.inlines.index(ConfigSettingsInline) + 1,
231231
GeoSettingsInline,
232232
)
233233
# Prepend DeviceLocationInline to config.DeviceAdminExportable

0 commit comments

Comments
 (0)