From dd53346abdfcb70e0d5812cae708cf3f1295f25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20HUBSCHER?= Date: Wed, 13 Jul 2016 17:42:57 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20call=20to=20Record=20resource=20with=20la?= =?UTF-8?q?st=20kinto=20release.=20=E2=80=94=20Fixes=20#97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.rst | 8 ++++++++ kinto_attachment/utils.py | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a356bc6..a743b3b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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) ------------------ diff --git a/kinto_attachment/utils.py b/kinto_attachment/utils.py index a5e07e4..4657451 100644 --- a/kinto_attachment/utils.py +++ b/kinto_attachment/utils.py @@ -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: @@ -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()