nautobot / nautobot-plugin-ssot-ipfabric

Nautobot SSoT IP Fabric
https://nautobot.github.io/nautobot-plugin-ssot-ipfabric/
Other
8 stars 2 forks source link

Sending none instead of empty string for interfaces #132

Closed ma9icmarker closed 1 year ago

ma9icmarker commented 1 year ago

Interface objects populated from IPFabric seems to hit an error with device imports. When there is no description on the device, the plug-in should send an empty string for the interface, as per the second example below.

interface_obj.description = fields.get ("description")

interface_obj.description = fields.get ("description", “”)

ghost commented 1 year ago

https://github.com/nautobot/nautobot-plugin-ssot-ipfabric/blob/a25b0d7b4e8667a9b72b2e90a271d12e4d9495ec/nautobot_ssot_ipfabric/diffsync/adapter_ipfabric.py#L62

Should this be changed to also? description=iface.get("dscr", ""),

https://github.com/nautobot/nautobot-plugin-ssot-ipfabric/blob/a25b0d7b4e8667a9b72b2e90a271d12e4d9495ec/nautobot_ssot_ipfabric/diffsync/adapter_nautobot.py#L97 description=interface_record.description if interface_record.description else "",