浏览代码

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

jeremystretch 4 年之前
父节点
当前提交
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
 * [#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
 * [#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,
         blank=True,
         null=True
         null=True
     )
     )
-    object_changes = GenericRelation(
-        to='extras.ObjectChange',
-        content_type_field='changed_object_type',
-        object_id_field='changed_object_id'
-    )
 
 
     class Meta:
     class Meta:
         abstract = True
         abstract = True