Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Set response values to zero if None for /_synapse/admin/v1/federation/destinations #16729

Merged
merged 3 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/16729.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix GET /_synapse/admin/v1/federation/destinations returning null (instead of 0) for `retry_last_ts` and `retry_interval`.
4 changes: 2 additions & 2 deletions synapse/rest/admin/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ async def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
"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],
}
Expand Down
Loading