change ordering field, remove front-end changes

This commit is contained in:
Arthur
2026-01-20 13:45:17 -08:00
parent 5a1282e326
commit c4c3518bb4
5 changed files with 17 additions and 34 deletions

View File

@@ -733,10 +733,9 @@ class ModuleForm(ModuleCommonForm, PrimaryModelForm):
)
module_bay = DynamicModelChoiceField(
label=_('Module bay'),
queryset=ModuleBay.objects.order_by('name'),
queryset=ModuleBay.objects.all(),
query_params={
'device_id': '$device',
'ordering': 'name',
'device_id': '$device'
},
context={
'disabled': 'installed_module',

View File

@@ -1273,7 +1273,7 @@ class ModuleBay(ModularComponentModel, TrackingModelMixin, MPTTModel):
verbose_name_plural = _('module bays')
class MPTTMeta:
order_insertion_by = ('module',)
order_insertion_by = ('name',)
def clean(self):
super().clean()