urlparse that URI
This commit is contained in:
parent
59acc9071f
commit
69f72d6ec0
@ -187,7 +187,9 @@ class APIObject(object):
|
|||||||
def url(self, parent=None):
|
def url(self, parent=None):
|
||||||
if self._data:
|
if self._data:
|
||||||
if 'uri' in self._data:
|
if 'uri' in self._data:
|
||||||
return self._data['uri']
|
path = urllib.parse.urlparse(self._data['uri']).path
|
||||||
|
if path.startswith("/api/v1"):
|
||||||
|
return path[7:]
|
||||||
return self.__class__.makeUrl(self.id, parent)
|
return self.__class__.makeUrl(self.id, parent)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user