new data model: change item url format to /category/base62

This commit is contained in:
Your Name 2022-12-24 01:32:48 -05:00
parent 116ca00a7d
commit 86b13bf08f

View file

@ -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: