Skip to content

Commit

Permalink
Fix: post_internal fails with URL_PREFIX or API_VERSION
Browse files Browse the repository at this point in the history
Closes #810.
  • Loading branch information
nicolaiarocci committed May 24, 2017
1 parent 3c65242 commit b809232
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Here you can see the full list of changes between each Eve release.
Development
-----------

Version 0.7.4
~~~~~~~~~~~~~

- Fix: ``post_internal`` fails when using ``URL_PREFIX`` or ``API_VERSION``.
Closes #810.

Stable
------

Expand Down
2 changes: 1 addition & 1 deletion eve/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def auth_field_and_value(resource):
.. versionadded:: 0.3
"""
if '|resource' in request.endpoint:
if request.endpoint and '|resource' in request.endpoint:
# We are on a resource endpoint and need to check against
# `public_methods`
public_method_list_to_check = 'public_methods'
Expand Down
2 changes: 1 addition & 1 deletion eve/methods/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ def resource_link():
"""
path = request.path.strip('/')

if '|item' in request.endpoint:
if request.endpoint and '|item' in request.endpoint:
path = path[:path.rfind('/')]

def strip_prefix(hit):
Expand Down

0 comments on commit b809232

Please sign in to comment.