mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-31 04:46:26 -06:00
7699 fix dcim tests
This commit is contained in:
parent
4112af534d
commit
65295f6d79
@ -958,10 +958,10 @@ class Device(
|
|||||||
})
|
})
|
||||||
|
|
||||||
# A Device can only be assigned to a Cluster in the same Site (or no Site)
|
# A Device can only be assigned to a Cluster in the same Site (or no Site)
|
||||||
if self.cluster and self.cluster.site is not None and self.cluster.site != self.site:
|
if self.cluster and self.cluster._site is not None and self.cluster._site != self.site:
|
||||||
raise ValidationError({
|
raise ValidationError({
|
||||||
'cluster': _("The assigned cluster belongs to a different site ({site})").format(
|
'cluster': _("The assigned cluster belongs to a different site ({site})").format(
|
||||||
site=self.cluster.site
|
site=self.cluster._site
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user