diff options
author | Will Hunt <will@half-shot.uk> | 2023-12-05 11:40:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 11:40:27 +0000 |
commit | ea783550bb8098f7c37e6ebfa83902108f377890 (patch) | |
tree | c2c3f66486fc972d3396791e30fb2613869b23e8 | |
parent | Fix postgres schema after dropping old tables (#16730) (diff) | |
download | synapse-ea783550bb8098f7c37e6ebfa83902108f377890.tar.xz |
Set response values to zero if None for /_synapse/admin/v1/federation/destinations (#16729)
-rw-r--r-- | changelog.d/16729.bugfix | 1 | ||||
-rw-r--r-- | synapse/rest/admin/federation.py | 4 |
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], } |