Skip to content

Commit

Permalink
fix _run_pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
RLKRo committed Dec 5, 2023
1 parent de97a12 commit 5c22cc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dff/pipeline/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ async def _run_pipeline(self, request: Message, ctx_id: Optional[Hashable] = Non
:param ctx_id: Current dialog id; if `None`, new dialog will be created.
:return: Dialog `Context`.
"""
if isinstance(self.context_storage, DBContextStorage):
if ctx_id is None:
ctx = Context()
elif isinstance(self.context_storage, DBContextStorage):
ctx = await self.context_storage.get_async(ctx_id, Context(id=ctx_id))
else:
ctx = self.context_storage.get(ctx_id, Context(id=ctx_id))
Expand Down

0 comments on commit 5c22cc7

Please sign in to comment.