diff options
| author | 2020-07-29 21:49:33 +0200 | |
|---|---|---|
| committer | 2020-07-29 21:49:33 +0200 | |
| commit | dd3275e8a8552f9d7580f9e2a070e8fae1d41b5d (patch) | |
| tree | 8d1547d7a7a5ae5d3ca503816344a63383c6bd4c | |
| parent | Fix broken antimalware tests. (diff) | |
Apply suggested change from @MarkKoz.
| -rw-r--r-- | bot/cogs/filter_lists.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bot/cogs/filter_lists.py b/bot/cogs/filter_lists.py index 3331be014..f133d53d9 100644 --- a/bot/cogs/filter_lists.py +++ b/bot/cogs/filter_lists.py @@ -88,10 +88,7 @@ class FilterLists(Cog): # Find the content and delete it. log.trace(f"Trying to delete the {content} item from the {list_type} {allow_type}") - for allow_list, metadata in self.bot.filter_list_cache[f"{list_type}.{allowed}"].items(): - if content == allow_list: - item = metadata - break + item = self.bot.filter_list_cache[f"{list_type}.{allowed}"].get(content) if item is not None: await self.bot.api_client.delete( |