From 2b39f6f3f090757a67227a4c76b096b7ec760bec Mon Sep 17 00:00:00 2001 From: Audionut Date: Mon, 14 Oct 2024 20:45:20 +1000 Subject: [PATCH] clear trackers meta if none before iterating over it Fixes https://github.com/Audionut/Upload-Assistant/issues/81 --- src/prep.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/prep.py b/src/prep.py index 0b68d33e3..b569c2df2 100644 --- a/src/prep.py +++ b/src/prep.py @@ -134,6 +134,10 @@ async def check_and_collect(image_dict): if isinstance(meta.get('trackers', ''), str): meta['trackers'] = [tracker.strip() for tracker in meta['trackers'].split(',')] + # if trackers is none then it need to be blanked + if meta.get('trackers') is None: + meta['trackers'] = [] + # Issue warning if any valid image is on an unapproved host and MTV is in the trackers list if 'MTV' in trackers_list or 'MTV' in meta.get('trackers', []): if invalid_host_found: