Merge pull request #495 from untitaker/trailing-slash-fix

Don't return `<item>/` for events
This commit is contained in:
Guillaume Ayoub 2016-08-29 21:31:25 +02:00 committed by GitHub
commit 5d9485d660

View File

@ -425,7 +425,7 @@ def name_from_path(path, collection):
start = collection.path + "/" start = collection.path + "/"
if not path.startswith(start): if not path.startswith(start):
raise ValueError("'%s' doesn't start with '%s'" % (path, start)) raise ValueError("'%s' doesn't start with '%s'" % (path, start))
return path[len(start):] return path[len(start):].rstrip("/")
def props_from_request(root, actions=("set", "remove")): def props_from_request(root, actions=("set", "remove")):