summary refs log tree commit diff
path: root/synapse/handlers/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-08 10:16:18 +0000
committerErik Johnston <erik@matrix.org>2014-12-08 10:16:18 +0000
commite8323b9e344a557452b17f4e0dea9d95feff747f (patch)
tree76ccdedd2da63783797f5d4729f442f7faabc620 /synapse/handlers/_base.py
parentFix registration (diff)
downloadsynapse-e8323b9e344a557452b17f4e0dea9d95feff747f.tar.xz
More bug fixes
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r--synapse/handlers/_base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index 0bff644192..871564a3a2 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -70,7 +70,11 @@ class BaseHandler(object):
             builder.room_id,
         )
 
-        depth = max([d for _, _, d in latest_ret])
+        if latest_ret:
+            depth = max([d for _, _, d in latest_ret])
+        else:
+            depth = 1
+
         prev_events = [(e, h) for e, h, _ in latest_ret]
 
         builder.prev_events = prev_events