mirror of https://github.com/langgenius/dify.git
fix web app bugs
This commit is contained in:
parent
61b41ca04b
commit
08b1f5d7c3
|
|
@ -51,7 +51,7 @@ class AppParameterApi(WebApiResource):
|
|||
raise AppUnavailableError()
|
||||
|
||||
features_dict = workflow.features_dict
|
||||
user_input_form = workflow.user_input_form
|
||||
user_input_form = workflow.user_input_form()
|
||||
else:
|
||||
app_model_config = app_model.app_model_config
|
||||
features_dict = app_model_config.to_dict()
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class App(db.Model):
|
|||
@property
|
||||
def workflow(self):
|
||||
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 None
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class Workflow(db.Model):
|
|||
|
||||
@property
|
||||
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:
|
||||
# get start node from graph
|
||||
|
|
|
|||
Loading…
Reference in New Issue