mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-14 13:10:12 +02:00
Merge branch 'develop' into feature
This commit is contained in:
@@ -137,7 +137,6 @@ class SiteBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -302,7 +301,6 @@ class RackBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -337,7 +335,6 @@ class RackReservationBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -400,7 +397,6 @@ class DeviceTypeBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -434,7 +430,6 @@ class ModuleTypeBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -549,7 +544,6 @@ class DeviceBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -592,7 +586,6 @@ class ModuleBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -639,7 +632,6 @@ class CableBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -663,7 +655,6 @@ class VirtualChassisBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -709,7 +700,6 @@ class PowerPanelBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@@ -767,7 +757,6 @@ class PowerFeedBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=forms.Textarea,
|
||||
label=_('Comments')
|
||||
)
|
||||
|
||||
|
||||
@@ -469,11 +469,14 @@ class DeviceImportForm(BaseDeviceImportForm):
|
||||
self.fields['location'].queryset = self.fields['location'].queryset.filter(**params)
|
||||
self.fields['parent'].queryset = self.fields['parent'].queryset.filter(**params)
|
||||
|
||||
# Limit rack queryset by assigned site and group
|
||||
# Limit rack queryset by assigned site and location
|
||||
params = {
|
||||
f"site__{self.fields['site'].to_field_name}": data.get('site'),
|
||||
f"location__{self.fields['location'].to_field_name}": data.get('location'),
|
||||
}
|
||||
if 'location' in data:
|
||||
params.update({
|
||||
f"location__{self.fields['location'].to_field_name}": data.get('location'),
|
||||
})
|
||||
self.fields['rack'].queryset = self.fields['rack'].queryset.filter(**params)
|
||||
|
||||
# Limit device bay queryset by parent device
|
||||
|
||||
Reference in New Issue
Block a user