Commit 6bd69911 authored by Nicolas Wavrant's avatar Nicolas Wavrant

fixup! WIP! raise if value doesn't match setter

parent 9b21507f
...@@ -651,7 +651,7 @@ class CategoryTool(BaseTool): ...@@ -651,7 +651,7 @@ class CategoryTool(BaseTool):
elif category_list is None: elif category_list is None:
category_list = () category_list = ()
elif isinstance(category_list, list): elif isinstance(category_list, list):
if any([not isinstance(c, str) for c in category_list]): if any([c is not None and not isinstance(c, str) for c in category_list]):
raise TypeError('CategoryTool.setCategoryMembership only takes string(s) as value', base_category_list, category_list) raise TypeError('CategoryTool.setCategoryMembership only takes string(s) as value', base_category_list, category_list)
if isinstance(base_category_list, str): if isinstance(base_category_list, str):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment