Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ def parse_files(self, files: list, slugs: list = None):
# 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