Skip to content

Commit

Permalink
Fixes #1847: Fix RecursionError when VC master device is unnamed
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Jan 30, 2018
1 parent 5037283 commit 215156c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/dcim/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ def to_csv(self):
def display_name(self):
if self.name:
return self.name
elif hasattr(self, 'vc_membership'):
elif hasattr(self, 'vc_membership') and self.vc_membership.virtual_chassis.master.name:
return "{}:{}".format(self.vc_membership.virtual_chassis.master, self.vc_membership.position)
elif hasattr(self, 'device_type'):
return "{}".format(self.device_type)
Expand Down

0 comments on commit 215156c

Please sign in to comment.