-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix buglet in DirectRenderJsonResource #8897
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add support for allowing users to pick their own user ID during a single-sign-on login. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,6 +275,10 @@ class DirectServeJsonResource(_AsyncResource): | |
formatting responses and errors as JSON. | ||
""" | ||
|
||
def __init__(self, canonical_json=False, extract_context=False): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've set the default for |
||
super().__init__(extract_context) | ||
self.canonical_json = canonical_json | ||
|
||
Comment on lines
+278
to
+281
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this change means that the first positional param of the constructor is now |
||
def _send_response( | ||
self, request: Request, code: int, response_object: Any, | ||
): | ||
|
@@ -318,9 +322,7 @@ class JsonResource(DirectServeJsonResource): | |
) | ||
|
||
def __init__(self, hs, canonical_json=True, extract_context=False): | ||
super().__init__(extract_context) | ||
|
||
self.canonical_json = canonical_json | ||
super().__init__(canonical_json, extract_context) | ||
self.clock = hs.get_clock() | ||
self.path_regexs = {} | ||
self.hs = hs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is part of a forthcoming feature, obviously.