Skip to content

Commit d928f77

Browse files
committed
Make sanic DatastarResponse send method compatible with superclass
1 parent 4ca06b2 commit d928f77

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/datastar_py/sanic.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ def __init__(
4040

4141
async def send(
4242
self,
43-
event: DatastarEvent | None = None,
43+
data: DatastarEvent | None = None,
4444
end_stream: bool | None = None,
4545
) -> None:
46-
if event and self.status == 204:
46+
if data and self.status == 204:
4747
# When the response is created with no content, it's set to a 204 by default
4848
# if we end up streaming to it, change the status code to 200 before sending.
4949
self.status = 200
50-
await super().send(event, end_stream=end_stream)
50+
await super().send(data, end_stream=end_stream)
5151

5252

5353
async def datastar_respond(

0 commit comments

Comments
 (0)