We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de1c512 commit ee6cbdcCopy full SHA for ee6cbdc
netbox/dcim/models/racks.py
@@ -373,7 +373,7 @@ def clean(self):
373
super().clean()
374
375
# Validate location/site assignment
376
- if self.site and self.location and self.location.site != self.site:
+ if self.site_id and self.location_id and self.location.site_id != self.site_id:
377
raise ValidationError(_("Assigned location must belong to parent site ({site}).").format(site=self.site))
378
379
# Validate outer dimensions and unit
0 commit comments