diff --git a/docs/release-notes/version-2.10.md b/docs/release-notes/version-2.10.md index 771fbbdbc..d62646bc4 100644 --- a/docs/release-notes/version-2.10.md +++ b/docs/release-notes/version-2.10.md @@ -1,13 +1,16 @@ # NetBox v2.10 -## v2.10.1 (Future Release) +## v2.10.1 (FUTURE) ### Bug Fixes +* [#5453](https://github.com/netbox-community/netbox/issues/5453) - Correct change log representation when creating a cable * [#5458](https://github.com/netbox-community/netbox/issues/5458) - Creating a component template throws an exception * [#5461](https://github.com/netbox-community/netbox/issues/5461) - Rack Elevations throw reverse match exception * [#5463](https://github.com/netbox-community/netbox/issues/5463) - Back-to-back Circuit Termination throws AttributeError exception +--- + ## v2.10.0 (2020-12-14) **NOTE:** This release completely removes support for embedded graphs. diff --git a/netbox/dcim/models/cables.py b/netbox/dcim/models/cables.py index 7a9f2dc2c..6a530bb49 100644 --- a/netbox/dcim/models/cables.py +++ b/netbox/dcim/models/cables.py @@ -147,7 +147,8 @@ class Cable(ChangeLoggedModel, CustomFieldModel): return instance def __str__(self): - return self.label or '#{}'.format(self._pk) + pk = self.pk or self._pk + return self.label or f'#{pk}' def get_absolute_url(self): return reverse('dcim:cable', args=[self.pk])