Explorar o código

rommumy喂养日记 优化查询喂养记录

linhaohong hai 5 meses
pai
achega
e52d0dd71b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Roomumy/Controller/FeedDiaryController.py

+ 1 - 1
Roomumy/Controller/FeedDiaryController.py

@@ -65,7 +65,7 @@ class FeedDiaryView(View):
         if not all([start_time, end_time, baby_id]):
             return response.json(444, {'error param': 'start_time, end_time or baby_id'})
         try:
-            feed_diary = FeedDiary.objects.filter(date_time__gte=start_time, date_time__lt=end_time,
+            feed_diary = FeedDiary.objects.filter(date_time__gte=start_time, date_time__lte=end_time,
                                                   baby_id=baby_id)
             if feed_type:
                 feed_diary = feed_diary.filter(feed_type=feed_type)