From fee94ac2a80244c2d109fcd1d77ed14b4649d55f Mon Sep 17 00:00:00 2001 From: Arthur Date: Thu, 1 Dec 2022 14:26:22 -0800 Subject: [PATCH] 11000 add commenting --- netbox/utilities/forms/forms.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/netbox/utilities/forms/forms.py b/netbox/utilities/forms/forms.py index e5bc59053..bcc598e3c 100644 --- a/netbox/utilities/forms/forms.py +++ b/netbox/utilities/forms/forms.py @@ -220,22 +220,20 @@ class ImportForm(BootstrapMixin, forms.Form): records = [] try: for data in yaml.load_all(data, Loader=yaml.SafeLoader): - """ - checks here are to support both arrays and multiple documents in - yaml data and return as a consistent list for processing (array): - - address: 10.0.1.0/24 - status: active - - address: 10.0.1.1/24 - status: active - vs (multi-document): - - address: 10.0.1.0/24 - status: active - --- - - address: 10.0.1.1/24 - status: active - device_type output uses multi-document format, but array format - is more common output from other tools. - """ + # checks here are to support both arrays and multiple documents in + # yaml data and return as a consistent list for processing (array): + # - address: 10.0.1.0/24 + # status: active + # - address: 10.0.1.1/24 + # status: active + # vs (multi-document): + # - address: 10.0.1.0/24 + # status: active + # --- + # - address: 10.0.1.1/24 + # status: active + # device_type output uses multi-document format, but array format + # is more common output from other tools. if type(data) == list: records.extend(data) elif type(data) == dict: