From 1bd1cd6938e1fa160364e1bffa81f24e903e9e2d Mon Sep 17 00:00:00 2001 From: takatost Date: Mon, 19 Feb 2024 16:04:52 +0800 Subject: [PATCH] fix: event handlers not registered globally (#2479) --- api/app.py | 5 +++-- api/pyproject.toml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/app.py b/api/app.py index bcf3856c13..ac8bf27df1 100644 --- a/api/app.py +++ b/api/app.py @@ -38,10 +38,11 @@ from extensions import ( from extensions.ext_database import db from extensions.ext_login import login_manager from libs.passport import PassportService - -# DO NOT REMOVE BELOW from services.account_service import AccountService +# DO NOT REMOVE BELOW +from events import event_handlers +from models import account, dataset, model, source, task, tool, tools, web # DO NOT REMOVE ABOVE diff --git a/api/pyproject.toml b/api/pyproject.toml index a04246bb52..3ec759386b 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -3,6 +3,7 @@ requires-python = ">=3.10" [tool.ruff] exclude = [ + "app.py", "__init__.py", "tests/", ]