Commit d1c6aa62 authored by Dominik Luntzer's avatar Dominik Luntzer

Correctly handle count parameter @ HistoryDict.save_node_value

The current implementation is actually a no-op since the data is truncated
correctly but not assigned back to self._datachanges.
Pop the first value instead since this function is called for every
datachange which means that not more than one value will every be removed
in a single call.
parent a61443ac
......@@ -94,7 +94,7 @@ class HistoryDict(HistoryStorageInterface):
while now - data[0].ServerTimestamp > period:
data.pop(0)
if count and len(data) > count:
data = data[-count:]
data.pop(0)
def read_node_history(self, node_id, start, end, nb_values):
cont = None
......
Markdown is supported
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