Explorar o código

Fix serialization of tags upon object deletion

Jeremy Stretch %!s(int64=5) %!d(string=hai) anos
pai
achega
5e71bad5cf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netbox/extras/middleware.py

+ 1 - 1
netbox/extras/middleware.py

@@ -46,7 +46,7 @@ def handle_deleted_object(sender, instance, **kwargs):
 
     # Preserve tags
     if is_taggable(instance):
-        copy.tags = DummyQuerySet(instance.tags.all())
+        copy.tags = list(instance.tags.all())
 
     # Queue the copy of the object for processing once the request completes
     _thread_locals.changed_objects.append(