From 10c1a233f91bd3fcc505e5521cadfc6ed8daa301 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Tue, 27 Aug 2019 14:49:12 +0100 Subject: [PATCH] Fix logic error. `absolute_fields` being None shouldn't preclude completion of a current stats row. Signed-off-by: Olivier Wilkinson (reivilibre) --- synapse/storage/stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py index d345b2cb32..ede5002fca 100644 --- a/synapse/storage/stats.py +++ b/synapse/storage/stats.py @@ -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)