mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 20:17:29 +08:00
fix web app bugs
This commit is contained in:
parent
61b41ca04b
commit
08b1f5d7c3
@ -51,7 +51,7 @@ class AppParameterApi(WebApiResource):
|
|||||||
raise AppUnavailableError()
|
raise AppUnavailableError()
|
||||||
|
|
||||||
features_dict = workflow.features_dict
|
features_dict = workflow.features_dict
|
||||||
user_input_form = workflow.user_input_form
|
user_input_form = workflow.user_input_form()
|
||||||
else:
|
else:
|
||||||
app_model_config = app_model.app_model_config
|
app_model_config = app_model.app_model_config
|
||||||
features_dict = app_model_config.to_dict()
|
features_dict = app_model_config.to_dict()
|
||||||
|
|||||||
@ -91,7 +91,7 @@ class App(db.Model):
|
|||||||
@property
|
@property
|
||||||
def workflow(self):
|
def workflow(self):
|
||||||
if self.workflow_id:
|
if self.workflow_id:
|
||||||
from api.models.workflow import Workflow
|
from .workflow import Workflow
|
||||||
return db.session.query(Workflow).filter(Workflow.id == self.workflow_id).first()
|
return db.session.query(Workflow).filter(Workflow.id == self.workflow_id).first()
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|||||||
@ -127,7 +127,7 @@ class Workflow(db.Model):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def features_dict(self):
|
def features_dict(self):
|
||||||
return json.loads(self.features) if self.features else None
|
return json.loads(self.features) if self.features else {}
|
||||||
|
|
||||||
def user_input_form(self) -> list:
|
def user_input_form(self) -> list:
|
||||||
# get start node from graph
|
# get start node from graph
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user