Remove redundant length check
> if `len(auth_event_ids) == 0` then `auth_event_ids` will be falsey, so the extra check is redundant. > > -- https://github.com/matrix-org/synapse/pull/11243#discussion_r745408186
This commit is contained in:
parent
d10625eb18
commit
2370dcadf6
|
@ -961,7 +961,7 @@ class EventCreationHandler:
|
|||
or len(prev_event_ids) > 0
|
||||
# Allow an event to have empty list of prev_event_ids
|
||||
# only if it has auth_event_ids.
|
||||
or (auth_event_ids and len(auth_event_ids) > 0)
|
||||
or auth_event_ids
|
||||
), "Attempting to create a non-m.room.create event with no prev_events or auth_event_ids"
|
||||
else:
|
||||
# we now ought to have some prev_events (unless it's a create event).
|
||||
|
|
Loading…
Reference in a new issue