From 97af5547b5c39f6fb2d1d82e3fd62a6567b38328 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Thu, 3 Nov 2022 14:48:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=A6=E6=A0=A1=E7=AB=99?= =?UTF-8?q?=E7=82=B9=E9=87=8D=E5=A4=8D=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pt_site/apps.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pt_site/apps.py b/pt_site/apps.py index 22ed034..991390c 100644 --- a/pt_site/apps.py +++ b/pt_site/apps.py @@ -18,6 +18,9 @@ def app_ready_handler(sender, **kwargs): logger.info('更新规则中,返回结果为True为新建,为False为更新,其他是错误了') btschool = Site.objects.filter(url='http://47.242.110.63/').first() if btschool: + bt_school = Site.objects.filter(url='https://pt.btschool.club/').first() + if bt_school: + bt_school.delete() btschool.url = 'https://pt.btschool.club/' btschool.save() for site_rules in data: