mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
修复无法添加百度OCR信息的BUG
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user