bug fixes
This commit is contained in:
parent
7026a360db
commit
ced08a1f38
|
@ -169,7 +169,7 @@ class Item(TimeStampedModel):
|
|||
@classmethod
|
||||
def from_external(cls, url):
|
||||
home = url_for('.home', _external=True)
|
||||
if not url.startswith(home):
|
||||
if url.startswith(home):
|
||||
username, _, hashid = url[len(home):].partition('/')
|
||||
else:
|
||||
m = re_server_url.match(url)
|
||||
|
@ -209,7 +209,10 @@ class XanaLink(Item):
|
|||
if item in titles:
|
||||
return parsed['type'] + " link for " + item.title(titles=titles)
|
||||
|
||||
return parsed['type'] + " link: " + self.hashid
|
||||
if parsed['type']:
|
||||
return parsed['type'] + " link: " + self.hashid
|
||||
else:
|
||||
return "link: " + self.hashid
|
||||
|
||||
@classmethod
|
||||
def get_all_titles(cls):
|
||||
|
|
Loading…
Reference in a new issue