7699 fix dcim tests

This commit is contained in:
Arthur Hanson 2024-10-24 08:58:07 -07:00
parent 4112af534d
commit 65295f6d79

View File

@ -958,10 +958,10 @@ class Device(
})
# 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({
'cluster': _("The assigned cluster belongs to a different site ({site})").format(
site=self.cluster.site
site=self.cluster._site
)
})