Browse Source

修改【问题帮助】在没数据时返回的数据格式

tanghongbin 5 years ago
parent
commit
b06772b268
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Controller/FAQController.py

+ 1 - 1
Controller/FAQController.py

@@ -241,7 +241,7 @@ class FAQView(View):
                 faq_qs = FAQModel.objects.filter()
 
             if not faq_qs.exists():
-                return response.json(0, [])
+                return response.json(0, {'count': 0, 'data': []})
             count = faq_qs.count()
             page = int(page)
             line = int(line)