mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2025-08-13 07:17:03 +02:00
Fix image upload v2 (#91)
* Add upload_image functionality to new beta script * Updated for new location of files with Boolean flag for front/rear image
This commit is contained in:
3
repo.py
3
repo.py
@ -95,6 +95,9 @@ class DTLRepo:
|
||||
data['manufacturer'] = {
|
||||
'name': manufacturer, 'slug': self.slug_format(manufacturer)}
|
||||
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user