mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
fix 修复部分用户升级时因皇后网址变更导致无法更新Xpath规则的bug
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user