소스 검색

fix historic prices not including current day

Daniel Sheffield 3 년 전
부모
커밋
8d4bb9fb9b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/price_view.py

+ 1 - 1
app/price_view.py

@@ -29,7 +29,7 @@ def get_where(product, unit, organic=None, limit='90 days'):
             Literal(organic),
         ]))
     where.append(
-        SQL("{ts} at time zone 'utc' BETWEEN now()::date - {interval} AND now()::date").format(
+        SQL("{ts} at time zone 'utc' BETWEEN now() - {interval} AND now()").format(
             ts=Identifier('ts'),
             interval=SQL("{literal}::interval").format(literal=Literal(limit))
         )