From 1c621abe20afa31a0e188a2d6a2c7fa9b9beca21 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Tue, 22 Nov 2022 20:22:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8D=87=E7=BA=A7=E6=97=B6=E5=9B=A0=E7=9A=87?= =?UTF-8?q?=E5=90=8E=E7=BD=91=E5=9D=80=E5=8F=98=E6=9B=B4=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=9B=B4=E6=96=B0Xpath=E8=A7=84=E5=88=99?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pt_site/apps.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pt_site/apps.py b/pt_site/apps.py index ca9bcf9..aa0e71a 100644 --- a/pt_site/apps.py +++ b/pt_site/apps.py @@ -16,13 +16,6 @@ def app_ready_handler(sender, **kwargs): data = json.load(f) logger.info('正在初始化站点规则信息表') logger.info('更新规则中,返回结果为True为新建,为False为更新,其他是错误了') - opencd = Site.objects.filter(url='https://open.cd/').first() - if opencd: - opencd = Site.objects.filter(url='https://www.open.cd/').first() - if opencd: - opencd.delete() - opencd.url = 'https://www.open.cd/' - opencd.save() for site_rules in data: if site_rules.get('pk'): del site_rules['pk']