Fixes #5453: Correct change log representation when creating a cable

This commit is contained in:
Jeremy Stretch 2020-12-15 13:37:02 -05:00
parent 14a46f82ee
commit 67f9e16905
2 changed files with 6 additions and 2 deletions

View File

@ -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.

View File

@ -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])