Fix management of database api 25/21425/1
authorfujinhua <fu.jinhua@zte.com.cn>
Tue, 31 Oct 2017 07:18:54 +0000 (15:18 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Tue, 31 Oct 2017 07:18:54 +0000 (15:18 +0800)
Change-Id: Ie7279dd48cd72ae5f0e41a61430f89c22c99e3fe
Issue-Id: VFC-571
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/samples/views.py

index eb6941c..cec3209 100644 (file)
@@ -18,6 +18,7 @@ import traceback
 from rest_framework import status
 from rest_framework.response import Response
 from rest_framework.views import APIView
+from lcm.pub.database import models
 
 logger = logging.getLogger(__name__)
 
@@ -27,7 +28,8 @@ class SampleList(APIView):
     List all samples.
     """
     def get(self, request, format=None):
-        logger.debug("get")
+        count = len(models.NSDModel.objects.filter())
+        logger.debug("get, count of NSDModel is %s", count)
         return Response({"status": "active"})