mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
修复学校站点重复导致无法升级的bug
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user