fix: image text when retrieve chat histories (#3220)
This commit is contained in:
parent
29918c498c
commit
4ad3f2cdc2
4 changed files with 54 additions and 7 deletions
|
|
@ -815,7 +815,7 @@ class Message(db.Model):
|
|||
@property
|
||||
def workflow_run(self):
|
||||
if self.workflow_run_id:
|
||||
from api.models.workflow import WorkflowRun
|
||||
from .workflow import WorkflowRun
|
||||
return db.session.query(WorkflowRun).filter(WorkflowRun.id == self.workflow_run_id).first()
|
||||
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -299,6 +299,10 @@ class WorkflowRun(db.Model):
|
|||
Message.workflow_run_id == self.id
|
||||
).first()
|
||||
|
||||
@property
|
||||
def workflow(self):
|
||||
return db.session.query(Workflow).filter(Workflow.id == self.workflow_id).first()
|
||||
|
||||
|
||||
class WorkflowNodeExecutionTriggeredFrom(Enum):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue