Closed mtinberg closed 2 years ago
Slug can't have char '&' and the process importing fail. To fix problem importing devicetype for "Rohde & Schwarz":
data['manufacturer']['slug'] = manufacturer.lower().replace(" ", "").replace("_&","")
In the PR, I implemented a clean solution in the original slugFormat()
function which solves the problem with special chars
https://github.com/minitriga/Netbox-Device-Type-Library-Import/blob/1f31c11edadccbdfa984e2cb170fe05f2142f3cf/nb-dt-import.py#L55
Slug can't have spaces, but some directories and the Manufacturer Name does have spaces, strip them out. Fixes problems importing devicetype-library for "Palo Alto"
data['manufacturer']['slug'] = manufacturer.lower().replace(" ", "")