Fix response None check in handlers

This commit is contained in:
Suren Khorenyan 2018-03-15 20:48:17 +03:00
parent 19f67a2e99
commit b45df4ea2e

View file

@ -72,7 +72,7 @@ class Handler:
context.set_value('handler', handler)
await self.dispatcher.middleware.trigger(f"process_{self.middleware_key}", args)
response = await handler(*args)
if results is not None:
if response is not None:
results.append(response)
if self.once:
break