See quotet 'none' and 'null' also as None answer.
This commit is contained in:
parent
e6f43b44de
commit
961e70f17e
@ -116,7 +116,8 @@ class AIResponder(object):
|
||||
|
||||
async def post_process(self, message: AIMessage, response: Dict[str, Any]) -> AIResponse:
|
||||
for fld in ('answer', 'staff', 'picture'):
|
||||
if str(response[fld]).strip().lower() in ('none', '', 'null'):
|
||||
if str(response[fld]).strip().lower() in \
|
||||
('none', '', 'null', '"none"', '"null"', "'none'", "'null'"):
|
||||
response[fld] = None
|
||||
for fld in ('answer_needed', 'hack'):
|
||||
if str(response[fld]).strip().lower() == 'true':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user