Skip to content
Open
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
15 changes: 10 additions & 5 deletions tornado_restless/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ def patch(self, instance_id: str=None):
result = self.patch_single(self.parse_pk(instance_id))

self._call_postprocessor(result=result)
self.finish(result)
if not self._finished:
self.finish(result)

def patch_many(self) -> dict:
"""
Expand Down Expand Up @@ -364,7 +365,8 @@ def delete(self, instance_id: str=None):
result = self.delete_single(self.parse_pk(instance_id))

self._call_postprocessor(result=result)
self.finish(result)
if not self._finished:
self.finish(result)

def delete_many(self) -> dict:
"""
Expand Down Expand Up @@ -455,7 +457,8 @@ def put(self, instance_id: str=None):
result = self.put_single(self.parse_pk(instance_id))

self._call_postprocessor(result=result)
self.finish(result)
if not self._finished:
self.finish(result)

put_many = patch_many
put_single = patch_single
Expand All @@ -480,7 +483,8 @@ def post(self, instance_id: str=None):
result = self.post_single()

self._call_postprocessor(result=result)
self.finish(result)
if not self._finished:
self.finish(result)

def post_single(self):
"""
Expand Down Expand Up @@ -691,7 +695,8 @@ def get(self, instance_id: str=None):
result = self.get_single(self.parse_pk(instance_id))

self._call_postprocessor(result=result)
self.finish(result)
if not self._finished:
self.finish(result)

def get_single(self, instance_id: list) -> dict:
"""
Expand Down