Răsfoiți Sursa

Fixes #8096: Fix DataError during change logging of objects with very long string representations

jeremystretch 4 ani în urmă
părinte
comite
b00eeb86ea
2 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 1 0
      docs/release-notes/version-3.1.md
  2. 1 1
      netbox/netbox/models.py

+ 1 - 0
docs/release-notes/version-3.1.md

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

+ 1 - 1
netbox/netbox/models.py

@@ -62,7 +62,7 @@ class ChangeLoggingMixin(models.Model):
         objectchange = ObjectChange(
             changed_object=self,
             related_object=related_object,
-            object_repr=str(self),
+            object_repr=str(self)[:200],
             action=action
         )
         if hasattr(self, '_prechange_snapshot'):