Move the check for backfilled outside the for loop

pull/680/head
Mark Haines 2016-03-31 15:09:09 +01:00
parent 76503f95ed
commit 5d06929169
1 changed files with 5 additions and 5 deletions

View File

@ -485,12 +485,12 @@ class EventsStore(SQLBaseStore):
],
)
for event, _ in state_events_and_contexts:
if backfilled:
# Backfilled events come before the current state so shouldn't
# clobber it.
continue
if backfilled:
# Backfilled events come before the current state so we don't need
# to update the current state table
return
for event, _ in state_events_and_contexts:
if (not event.internal_metadata.is_invite_from_remote()
and event.internal_metadata.is_outlier()):
# Outlier events generally shouldn't clobber the current state.