Browse Source

prepare_cloned_fields() should always return a QueryDict

jeremystretch 3 năm trước cách đây
mục cha
commit
c11af40a06
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      netbox/utilities/utils.py

+ 1 - 1
netbox/utilities/utils.py

@@ -286,7 +286,7 @@ def prepare_cloned_fields(instance):
     """
     # Generate the clone attributes from the instance
     if not hasattr(instance, 'clone'):
-        return None
+        return QueryDict()
     attrs = instance.clone()
 
     # Prepare querydict parameters