Skip to content

Commit

Permalink
Merge pull request #158 from Kinto/support-kinto-12
Browse files Browse the repository at this point in the history
Fix support of Kinto v12
  • Loading branch information
leplatrem committed Dec 19, 2018
2 parents 186cc00 + b7aacd4 commit 02159a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Changelog
6.1.0 (unreleased)
------------------

- Nothing changed yet.
**Bug fixes**

- Fix support of kinto >= 12

6.0.0 (2018-10-02)
------------------
Expand Down
9 changes: 4 additions & 5 deletions kinto_attachment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ def sha256(content):


def _object_uri(request, resource_name, matchdict, prefix):
route_name = '%s-record' % resource_name
full = request.route_path(route_name, **matchdict)
if not prefix:
return core_utils.strip_uri_prefix(full)
return full
uri = core_utils.instance_uri(request, resource_name=resource_name, **matchdict)
if prefix:
uri = f"/{request.registry.route_prefix}{uri}"
return uri


def bucket_uri(request, prefix=False):
Expand Down

0 comments on commit 02159a0

Please sign in to comment.