From e491715dfb6e7f866e10965cf9f12e0a782e83f8 Mon Sep 17 00:00:00 2001 From: Jeff Groom Date: Wed, 10 Apr 2024 11:31:38 -0600 Subject: [PATCH] Update repo.py resolve #117 --- repo.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/repo.py b/repo.py index f52e0b0..6a4a1c6 100644 --- a/repo.py +++ b/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