ソースを参照

fix dropdown sorting

Arthur 1 週間 前
コミット
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'),
         label=_('Module bay'),
         queryset=ModuleBay.objects.all(),
         queryset=ModuleBay.objects.all(),
         query_params={
         query_params={
-            'device_id': '$device'
+            'device_id': '$device',
+            'ordering': 'name',
         },
         },
         context={
         context={
             'disabled': 'installed_module',
             'disabled': 'installed_module',