question_cmd: when no tags are specified, no tags are selected

This commit is contained in:
juk0de 2023-09-10 08:25:33 +02:00
parent 3fc23feae3
commit 130e456d18

View File

@ -52,9 +52,9 @@ def question_cmd(args: argparse.Namespace, config: Config) -> None:
""" """
Handler for the 'question' command. Handler for the 'question' command.
""" """
mfilter = MessageFilter(tags_or=args.or_tags, mfilter = MessageFilter(tags_or=args.or_tags if args.or_tags is not None else set(),
tags_and=args.and_tags, tags_and=args.and_tags if args.and_tags is not None else set(),
tags_not=args.exclude_tags) tags_not=args.exclude_tags if args.exclude_tags is not None else set())
chat = ChatDB.from_dir(cache_path=Path('.'), chat = ChatDB.from_dir(cache_path=Path('.'),
db_path=Path(config.db), db_path=Path(config.db),
mfilter=mfilter) mfilter=mfilter)