fix content urls

modified:   make_post_sell/models/product.py
This commit is contained in:
Russell Ballestrini 2024-07-04 15:52:46 -04:00
parent 909eebfac5
commit bb95314c0e

View file

@ -374,9 +374,10 @@ class Product(RBase, Base):
https://my.makepostsell.com/p/product-uuid
"""
p_or_c = "p" if self.is_sellable else "c"
if slug:
return f"{request.host_url}/p/{self.id}/{self.slug}"
return f"{request.host_url}/p/{self.id}"
return f"{request.host_url}/{p_or_c}/{self.id}/{self.slug}"
return f"{request.host_url}/{p_or_c}/{self.id}"
def absolute_edit_url(self, request):
"""