new data model: change item url format to /category/base62
This commit is contained in:
parent
116ca00a7d
commit
86b13bf08f
1 changed files with 1 additions and 1 deletions
|
@ -243,7 +243,7 @@ class Item(SoftDeleteMixin, PolymorphicModel):
|
|||
|
||||
@classmethod
|
||||
def get_by_url(cls, url_or_b62):
|
||||
b62 = url_or_b62.strip().split('/')[-2]
|
||||
b62 = url_or_b62.strip().split('/')[-1]
|
||||
return cls.objects.get(uid=uuid.UUID(int=base62.decode(b62)))
|
||||
|
||||
# def get_lookup_id(self, id_type: str) -> str:
|
||||
|
|
Loading…
Add table
Reference in a new issue