Skip to content

Commit 42527c3

Browse files
committed
2 parents 9aa2564 + 1822d66 commit 42527c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_rest_jsonapi/resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def patch(self, *args, **kwargs):
271271
if 'id' not in json_data['data']:
272272
raise BadRequest('Missing id in "data" node',
273273
source={'pointer': '/data/id'})
274-
if json_data['data']['id'] != str(kwargs[self.data_layer.get('url_field', 'id')]):
274+
if (str(json_data['data']['id']) != str(kwargs[getattr(self._data_layer, 'url_field', 'id')])):
275275
raise BadRequest('Value of id does not match the resource identifier in url',
276276
source={'pointer': '/data/id'})
277277

0 commit comments

Comments
 (0)