From f35719d39bb9e88fa7323cb3f291eaf9751b2d50 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sun, 20 Nov 2022 22:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=99=BE=E5=BA=A6OCR=E4=BF=A1=E6=81=AF=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_pt/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_pt/admin.py b/auto_pt/admin.py index 406cda4..6473f39 100644 --- a/auto_pt/admin.py +++ b/auto_pt/admin.py @@ -238,7 +238,7 @@ class OCRAdmin(admin.ModelAdmin): def has_add_permission(self, request): # 保证只有一条记录 - count = Notify.objects.all().count() + count = OCR.objects.all().count() if count != 1: return True return False