Commit 6c8b6a83 authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

get_history: in the `delta` case, make it clear we compute the from/to value dates


What is passed to snapshot.find is *not* the user-provided from/to
value dates (for clarity).
parent c4092ed67c1a
......@@ -179,17 +179,17 @@ class TimeSerie(SeriesServices):
series = []
if (deltabefore, deltaafter) != (None, None):
for csid, idate in revs:
from_value_date = None
to_value_date = None
from_date = None
to_date = None
if deltabefore is not None:
from_value_date = idate - deltabefore
from_date = idate - deltabefore
if deltaafter is not None:
to_value_date = idate + deltaafter
to_date = idate + deltaafter
series.append((
idate,
snapshot.find(csetfilter=[lambda cset: cset.c.id == csid],
from_value_date=from_value_date,
to_value_date=to_value_date)[1]
from_value_date=from_date,
to_value_date=to_date)[1]
))
else:
series = snapshot.findall(revs,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment