Permalink
Browse files

Removed assignments to `result` and `params` variables in preprocess and

postprocess.

Preprocess and postprocess functions are directly modifying dictionary
from the input so it does not make much sense to require them to return
any value (`result` or `params` dictionaries).
  • Loading branch information...
1 parent 7139488 commit 6c8c4a96d6746a510b66d8434caf1c2c1ee4cb20 Libor Nenadál committed Jun 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 flask_restless/views.py
View
4 flask_restless/views.py
@@ -853,7 +853,7 @@ def get(self, instid, relation=None):
deep = dict((r, {}) for r in relations)
result = _to_dict_include(inst, deep, include=self.include_columns)
if self.get_result_postprocessor:
- result = self.get_result_postprocessor(result)
+ self.get_result_postprocessor(result)
return jsonify(result)
def delete(self, instid):
@@ -901,7 +901,7 @@ def post(self):
# If post_form_preprocessor is specified, call it
if self.post_form_preprocessor:
- params = self.post_form_preprocessor(params)
+ self.post_form_preprocessor(params)
# Getting the list of relations that will be added later
cols = _get_columns(self.model)

0 comments on commit 6c8c4a9

Please sign in to comment.