Fix detail behavior

This commit is contained in:
Richard Chien 2019-01-25 22:30:35 +08:00
parent 189cf23720
commit 0ecaa57230

View File

@ -97,8 +97,9 @@ class Command:
# fallback to command-level args_parser_func # fallback to command-level args_parser_func
if self.args_parser_func: if self.args_parser_func:
await self.args_parser_func(session) await self.args_parser_func(session)
elif session.current_key is not None: if session.current_key is not None and \
# no args_parser_func, fallback to default behavior session.current_key not in session.state:
# args_parser_func didn't set state, here we set it
session.state[session.current_key] = session.current_arg session.state[session.current_key] = session.current_arg
await self.func(session) await self.func(session)