Skip to content

Commit 0d625e6

Browse files
authored
Add before_marshmallow hook to POST handler
When this hook was introduced by @kumy in #123, it was not added to the `post()` method. I'm pretty sure this is an oversight, as it's just as useful there as anywhere else, and there's no discussion about specifically omitting it.
1 parent d10a65f commit 0d625e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flask_rest_jsonapi/resource.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ def post(self, *args, **kwargs):
148148
json_data = request.get_json() or {}
149149

150150
qs = QSManager(request.args, self.schema)
151+
152+
self.before_marshmallow(args, kwargs)
151153

152154
schema = compute_schema(self.schema,
153155
getattr(self, 'post_schema_kwargs', dict()),

0 commit comments

Comments
 (0)