From 3501aa6c54891ba7563e3eac8caeb94ca9eddf1b Mon Sep 17 00:00:00 2001 From: ngfchl Date: Thu, 3 Nov 2022 09:20:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E8=AF=A6=E7=BB=86=E9=94=99=E8=AF=AF=E5=86=99?= =?UTF-8?q?=E5=85=A5=E6=97=A5=E5=BF=97=EF=BC=8C=E9=80=9A=E7=9F=A5=E5=8F=AA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=AE=80=E8=A6=81=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_pt/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto_pt/views.py b/auto_pt/views.py index 7f9eedb..567fc14 100644 --- a/auto_pt/views.py +++ b/auto_pt/views.py @@ -369,7 +369,7 @@ def do_update(request): try: logger.info('开始更新') bt_school = Site.objects.filter(url='http://47.242.110.63/').first() - if not bt_school: + if bt_school: bt_school.url = 'https://pt.btschool.club/' bt_school.save() pt_site_site_mtime = os.stat('pt_site_site.json').st_mtime @@ -377,7 +377,7 @@ def do_update(request): update_commands = { # 'cp db/db.sqlite3 db/db.sqlite3-$(date "+%Y%m%d%H%M%S")', '强制覆盖本地': 'git reset --hard', - '获取更新信息': 'git fetch', + '获取更新信息': 'git fetch --all', '拉取代码更新': 'git pull origin {}'.format(os.getenv('DEV')), } requirements_commands = {