summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/16729.bugfix1
-rw-r--r--synapse/rest/admin/federation.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/16729.bugfix b/changelog.d/16729.bugfix
new file mode 100644
index 0000000000..50e72ac1f8
--- /dev/null
+++ b/changelog.d/16729.bugfix
@@ -0,0 +1 @@
+Fix GET /_synapse/admin/v1/federation/destinations returning null (instead of 0) for `retry_last_ts` and `retry_interval`.
diff --git a/synapse/rest/admin/federation.py b/synapse/rest/admin/federation.py
index a6ce787da1..2f238f0217 100644
--- a/synapse/rest/admin/federation.py
+++ b/synapse/rest/admin/federation.py
@@ -89,8 +89,8 @@ class ListDestinationsRestServlet(RestServlet):
             "destinations": [
                 {
                     "destination": r[0],
-                    "retry_last_ts": r[1],
-                    "retry_interval": r[2],
+                    "retry_last_ts": r[1] or 0,
+                    "retry_interval": r[2] or 0,
                     "failure_ts": r[3],
                     "last_successful_stream_ordering": r[4],
                 }