Просмотр исходного кода

Fixes #7644: Prevent inadvertent deletion of prior change records when deleting objects (#7333 revisited)

jeremystretch 4 лет назад
Родитель
Сommit
87779b7b88
2 измененных файлов с 1 добавлено и 5 удалено
  1. 1 0
      docs/release-notes/version-3.0.md
  2. 0 5
      netbox/netbox/models.py

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

@@ -6,6 +6,7 @@
 
 * [#7612](https://github.com/netbox-community/netbox/issues/7612) - Strip HTML from custom field descriptions
 * [#7628](https://github.com/netbox-community/netbox/issues/7628) - Fix `load_yaml` method for custom scripts
+* [#7644](https://github.com/netbox-community/netbox/issues/7644) - Prevent inadvertent deletion of prior change records when deleting objects (#7333 revisited)
 
 ---
 

+ 0 - 5
netbox/netbox/models.py

@@ -40,11 +40,6 @@ class ChangeLoggingMixin(models.Model):
         blank=True,
         null=True
     )
-    object_changes = GenericRelation(
-        to='extras.ObjectChange',
-        content_type_field='changed_object_type',
-        object_id_field='changed_object_id'
-    )
 
     class Meta:
         abstract = True