修复学校站点重复导致无法升级的bug

This commit is contained in:
ngfchl
2022-11-03 14:48:06 +08:00
parent 775e8f1cb5
commit 97af5547b5

View File

@@ -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: