Fix logic error.

`absolute_fields` being None shouldn't preclude completion of a current
stats row.

Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
This commit is contained in:
Olivier Wilkinson (reivilibre) 2019-08-27 14:49:12 +01:00
parent 44d3c2e80b
commit 10c1a233f9

View file

@ -430,7 +430,8 @@ class StatsStore(StateDeltasStore):
if absolute_fields is None:
absolute_fields = {}
elif complete_with_stream_id is not None:
if complete_with_stream_id is not None:
absolute_fields = absolute_fields.copy()
absolute_fields["completed_delta_stream_id"] = complete_with_stream_id
self.get_earliest_token_for_stats.invalidate(stats_type, stats_id)