From f8d99fbb576d98183a4d88e38b290b6cf497703d Mon Sep 17 00:00:00 2001 From: Christopher Cianelli Date: Wed, 27 Sep 2023 11:52:22 -0400 Subject: [PATCH] fix wl bug when creating a new wl when wl count is 0 --- msticpy/context/azure/sentinel_watchlists.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/msticpy/context/azure/sentinel_watchlists.py b/msticpy/context/azure/sentinel_watchlists.py index ae54fc889..c0f59f784 100644 --- a/msticpy/context/azure/sentinel_watchlists.py +++ b/msticpy/context/azure/sentinel_watchlists.py @@ -328,5 +328,7 @@ def _check_watchlist_exists( """ # Check requested watchlist actually exists - existing_watchlists = self.list_watchlists()["name"].values - return watchlist_name in existing_watchlists + existing_watchlists = self.list_watchlists() + if existing_watchlists.empty: + return False + return watchlist_name in existing_watchlists["name"].values