From e520d2d3ba184ce6b1dc5e194161d8f853b103f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Sat, 8 Jul 2023 20:08:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=98=E5=8C=96:=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0signal=20=E4=BF=A1=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/dvadmin/system/management/commands/init.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/dvadmin/system/management/commands/init.py b/backend/dvadmin/system/management/commands/init.py index c026164..db01139 100644 --- a/backend/dvadmin/system/management/commands/init.py +++ b/backend/dvadmin/system/management/commands/init.py @@ -30,9 +30,9 @@ class Command(BaseCommand): reset = True if isinstance(options.get("n"), list) or isinstance(options.get("N"), list): reset = False - signals.pre_init_complete.send(msg='开始初始化', data={"reset": reset}) + signals.pre_init_complete.send(sender=None, msg='开始初始化', data={"reset": reset}) for app in settings.INSTALLED_APPS: - signals.detail_init_complete.send(msg='初始化中', data={"app": app, "reset": reset}) + signals.detail_init_complete.send(sender=None, msg='初始化中', data={"app": app, "reset": reset}) try: exec( f""" @@ -51,5 +51,5 @@ main(reset={reset}) ) except ModuleNotFoundError: pass - signals.post_init_complete.send(msg='初始化完成', data={"reset": reset}) + signals.post_init_complete.send(sender=None, msg='初始化完成', data={"reset": reset}) print("初始化数据完成!")