林轩 5 ماه پیش
والد
کامیت
9323137900
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      apps/Weather/views.py

+ 1 - 1
apps/Weather/views.py

@@ -127,7 +127,7 @@ class HistoryAPIView(APIView):
                 return Response({"msg": "暂无数据", "code": 500})
                 return Response({"msg": "暂无数据", "code": 500})
         # 去历史表中查询数据
         # 去历史表中查询数据
         try:
         try:
-            history_data = HistoryData.objects.get(cityid=cityid, timestamp=timestamp)
+            history_data = HistoryData.objects.get(cityid=cityid, timestamp=int(timestamp))
             content = history_data.content
             content = history_data.content
             low_heigh = json.loads(content)
             low_heigh = json.loads(content)
             return Response(
             return Response(