mirror of https://github.com/langgenius/dify.git
fix: add account import for wraps
This commit is contained in:
parent
7ac1629797
commit
341ee17042
|
|
@ -21,6 +21,7 @@ def _load_app_model(app_id: str) -> App | None:
|
|||
)
|
||||
return app_model
|
||||
|
||||
|
||||
def _load_app_model_with_trial(app_id: str) -> App | None:
|
||||
assert isinstance(current_user, Account)
|
||||
app_model = (
|
||||
|
|
@ -30,6 +31,7 @@ def _load_app_model_with_trial(app_id: str) -> App | None:
|
|||
)
|
||||
return app_model
|
||||
|
||||
|
||||
def get_app_model(view: Callable[P, R] | None = None, *, mode: Union[AppMode, list[AppMode], None] = None):
|
||||
def decorator(view_func: Callable[P, R]):
|
||||
@wraps(view_func)
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ from controllers.console.wraps import account_initialization_required
|
|||
from extensions.ext_database import db
|
||||
from libs.login import login_required
|
||||
from models import AccountTrialAppRecord, App, InstalledApp, TrialApp
|
||||
from models.account import Account
|
||||
from services.app_service import AppService
|
||||
from services.enterprise.enterprise_service import EnterpriseService
|
||||
from services.feature_service import FeatureService
|
||||
from models.account import Account
|
||||
|
||||
P = ParamSpec("P")
|
||||
R = TypeVar("R")
|
||||
|
|
|
|||
Loading…
Reference in New Issue