Skip to content

Commit

Permalink
Fix call to Record resource with last kinto release. — Fixes #97
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Jul 13, 2016
1 parent cf1792b commit dd53346
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

0.7.1 (unreleased)
------------------

**Bug fixes**

- Update the call to the Record resource to use named attributes. (#97)


0.7.0 (2016-06-10)
------------------

Expand Down
4 changes: 2 additions & 2 deletions kinto_attachment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, request):
super(AttachmentRouteFactory, self).__init__(request)
self.resource_name = 'record'
try:
resource = Record(request, self)
resource = Record(request, context=self)
request.current_resource_name = 'record'
existing = resource.get()
except httpexceptions.HTTPNotFound:
Expand Down Expand Up @@ -87,7 +87,7 @@ def patch_record(record, request):
# Simulate update of fields.
request.validated = record
request.body = json.dumps(record).encode('utf-8')
resource = Record(request, context)
resource = Record(request, context=context)
request.current_resource_name = 'record'
try:
saved = resource.patch()
Expand Down

0 comments on commit dd53346

Please sign in to comment.