Update repo.py

resolve #117
This commit is contained in:
Jeff Groom 2024-04-10 11:31:38 -06:00 committed by GitHub
parent dda8ed8c2f
commit e491715dfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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