Browse Source

post_data(): Ignore iterables

Jeremy Stretch 6 năm trước cách đây
mục cha
commit
6a17be740b
1 tập tin đã thay đổi với 2 bổ sung và 0 xóa
  1. 2 0
      netbox/utilities/testing/utils.py

+ 2 - 0
netbox/utilities/testing/utils.py

@@ -32,6 +32,8 @@ def post_data(data):
     for key, value in data.items():
     for key, value in data.items():
         if value is None:
         if value is None:
             ret[key] = ''
             ret[key] = ''
+        elif type(value) in (list, tuple):
+            ret[key] = value
         else:
         else:
             ret[key] = str(value)
             ret[key] = str(value)