Skip to content

Commit b00eeb8

Browse files
committed
Fixes #8096: Fix DataError during change logging of objects with very long string representations
1 parent 628e186 commit b00eeb8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/release-notes/version-3.1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* [#8078](https://github.com/netbox-community/netbox/issues/8078) - Add missing wireless models to `lsmodels()` in `nbshell`
1919
* [#8079](https://github.com/netbox-community/netbox/issues/8079) - Fix validation of LLDP neighbors when connected device has an asset tag
2020
* [#8088](https://github.com/netbox-community/netbox/issues/8088) - Improve legibility of text in labels with light-colored backgrounds
21+
* [#8096](https://github.com/netbox-community/netbox/issues/8096) - Fix DataError during change logging of objects with very long string representations
2122

2223
---
2324

netbox/netbox/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def to_objectchange(self, action, related_object=None):
6262
objectchange = ObjectChange(
6363
changed_object=self,
6464
related_object=related_object,
65-
object_repr=str(self),
65+
object_repr=str(self)[:200],
6666
action=action
6767
)
6868
if hasattr(self, '_prechange_snapshot'):

0 commit comments

Comments
 (0)