Explorar o código

fix historic prices not including current day

Daniel Sheffield %!s(int64=3) %!d(string=hai) anos
pai
achega
8d4bb9fb9b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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))
         )