fix: null annotation (#7313)

This commit is contained in:
Nam Vu 2024-08-15 18:20:14 +07:00 committed by GitHub
parent f3d3a3a5db
commit ed85d8281a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -249,8 +249,7 @@ class AdvancedChatAppGenerateTaskPipeline(BasedGenerateTaskPipeline, WorkflowCyc
"""
for message in self._queue_manager.listen():
if (message.event
and hasattr(message.event, 'metadata')
and message.event.metadata
and getattr(message.event, 'metadata', None)
and message.event.metadata.get('is_answer_previous_node', False)
and publisher):
publisher.publish(message=message)