diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 4fef2aef0c..ff198d0a3e 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -216,11 +216,11 @@ class DeviceWorkerHandler(BaseHandler): possibly_joined = [] possibly_left = [] - opentracing.log_kv( - {"changed": list(possibly_joined), "left": list(possibly_left)} - ) + result = {"changed": list(possibly_joined), "left": list(possibly_left)} - return {"changed": list(possibly_joined), "left": list(possibly_left)} + opentracing.log_kv(result) + + return {result} class DeviceHandler(DeviceWorkerHandler):