mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2024-11-25 00:53:12 +01:00
parent
dda8ed8c2f
commit
e491715dfb
8
repo.py
8
repo.py
@ -98,9 +98,11 @@ class DTLRepo:
|
||||
# Save file location to resolve any relative paths for images
|
||||
data['src'] = file
|
||||
|
||||
if slugs and True not in [True if s.casefold() in data['slug'].casefold() else False for s in slugs]:
|
||||
self.handle.verbose_log(f"Skipping {data['model']}")
|
||||
continue
|
||||
if slugs:
|
||||
slug_present = any(s.casefold() in data.get('slug', '').casefold() for s in slugs)
|
||||
if not slug_present:
|
||||
self.handle.verbose_log(f"Skipping {data['model']}")
|
||||
continue
|
||||
|
||||
deviceTypes.append(data)
|
||||
return deviceTypes
|
||||
|
Loading…
Reference in New Issue
Block a user