Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

db: Check connection type in wrapper_execute.

Anders Kaseorg2c9c105bbb64
diff --git a/zerver/lib/db.py b/zerver/lib/db.py
index f8b008e04e3..b5a0eac3a06 100644
--- a/zerver/lib/db.py
+++ b/zerver/lib/db.py
@@ -22,6 +22,7 @@ def wrapper_execute(
finally:
stop = time.time()
duration = stop - start
+ assert isinstance(self.connection, TimeTrackingConnection)
self.connection.queries.append(
{
"time": f"{duration:.3f}",