瀏覽代碼

fix dropdown sorting

Arthur 2 月之前
父節點
當前提交
d18ef98b00
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      netbox/dcim/forms/model_forms.py

+ 2 - 1
netbox/dcim/forms/model_forms.py

@@ -745,7 +745,8 @@ class ModuleForm(ModuleCommonForm, PrimaryModelForm):
         label=_('Module bay'),
         queryset=ModuleBay.objects.all(),
         query_params={
-            'device_id': '$device'
+            'device_id': '$device',
+            'ordering': 'name',
         },
         context={
             'disabled': 'installed_module',