From 130e456d18b6ca2463e7abdbdc8201eab6ed43f6 Mon Sep 17 00:00:00 2001 From: juk0de Date: Sun, 10 Sep 2023 08:25:33 +0200 Subject: [PATCH] question_cmd: when no tags are specified, no tags are selected --- chatmastermind/commands/question.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chatmastermind/commands/question.py b/chatmastermind/commands/question.py index f439447..4936d8f 100644 --- a/chatmastermind/commands/question.py +++ b/chatmastermind/commands/question.py @@ -52,9 +52,9 @@ def question_cmd(args: argparse.Namespace, config: Config) -> None: """ Handler for the 'question' command. """ - mfilter = MessageFilter(tags_or=args.or_tags, - tags_and=args.and_tags, - tags_not=args.exclude_tags) + mfilter = MessageFilter(tags_or=args.or_tags if args.or_tags is not None else set(), + tags_and=args.and_tags if args.and_tags is not None else set(), + tags_not=args.exclude_tags if args.exclude_tags is not None else set()) chat = ChatDB.from_dir(cache_path=Path('.'), db_path=Path(config.db), mfilter=mfilter)