summary refs log tree commit diff
path: root/synapse/util/iterutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/util/iterutils.py')
-rw-r--r--synapse/util/iterutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/iterutils.py b/synapse/util/iterutils.py
index f7b4857a84..6ef2b008a4 100644
--- a/synapse/util/iterutils.py
+++ b/synapse/util/iterutils.py
@@ -92,7 +92,7 @@ def sorted_topologically(
         node = heapq.heappop(zero_degree)
         yield node
 
-        for edge in reverse_graph[node]:
+        for edge in reverse_graph.get(node, []):
             if edge in degree_map:
                 degree_map[edge] -= 1
                 if degree_map[edge] == 0: