1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3283: Fix rack group assignment on PowerFeed CSV import

This commit is contained in:
Jeremy Stretch
2019-06-24 11:10:35 -04:00
parent 653770ede9
commit 251ba08e09
2 changed files with 2 additions and 1 deletions

View File

@@ -3585,7 +3585,7 @@ class PowerFeedCSVForm(forms.ModelForm):
# Validate rack
if rack_name:
try:
self.instance.rack = Rack.objects.get(site=site, rack_group=rack_group, name=rack_name)
self.instance.rack = Rack.objects.get(site=site, group__name=rack_group, name=rack_name)
except Rack.DoesNotExist:
raise forms.ValidationError(
"Rack {} not found in site {}, group {}".format(rack_name, site, rack_group)