tidy workaround

This commit is contained in:
Edward Betts 2017-02-20 11:12:44 +00:00
parent 1e0891623a
commit 5cdc4202e9

View file

@ -169,6 +169,9 @@ class Item(TimeStampedModel):
@classmethod @classmethod
def from_external(cls, url): def from_external(cls, url):
home = url_for('.home', _external=True) home = url_for('.home', _external=True)
if not url.startswith(home):
username, _, hashid = url[len(home):].partition('/')
else:
m = re_server_url.match(url) m = re_server_url.match(url)
if not m: if not m:
return return