Skip to content

Commit 11bcdfd

Browse files
committed
add compatibility with marshallow 3.8
1 parent 3ce7482 commit 11bcdfd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

flask_rest_jsonapi/resource.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def post(self, *args, **kwargs):
150150
json_data = request.get_json() or {}
151151

152152
qs = QSManager(request.args, self.schema)
153-
153+
154154
self.before_marshmallow(args, kwargs)
155155

156156
schema = compute_schema(self.schema,
@@ -263,7 +263,6 @@ def patch(self, *args, **kwargs):
263263

264264
qs = QSManager(request.args, self.schema)
265265
schema_kwargs = getattr(self, 'patch_schema_kwargs', dict())
266-
schema_kwargs.update({'partial': True})
267266

268267
self.before_marshmallow(args, kwargs)
269268

@@ -273,7 +272,7 @@ def patch(self, *args, **kwargs):
273272
qs.include)
274273

275274
try:
276-
data = schema.load(json_data)
275+
data = schema.load(json_data, partial=True)
277276
except IncorrectTypeError as e:
278277
errors = e.messages
279278
for error in errors['errors']:

0 commit comments

Comments
 (0)