Features: ;
Fixes: 1) Correct logical condition to check if product_uuid is in recently_viewed; Extra: ;
This commit is contained in:
parent
3590dbbe2b
commit
d6f178acb6
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ class User(AbstractUser, NiceModel):
|
||||||
|
|
||||||
def add_to_recently_viewed(self, product_uuid):
|
def add_to_recently_viewed(self, product_uuid):
|
||||||
recently_viewed = self.recently_viewed
|
recently_viewed = self.recently_viewed
|
||||||
if not product_uuid in recently_viewed:
|
if product_uuid not in recently_viewed:
|
||||||
if not len(recently_viewed) >= 48:
|
if not len(recently_viewed) >= 48:
|
||||||
recently_viewed.append(product_uuid)
|
recently_viewed.append(product_uuid)
|
||||||
cache.set(f"user_{self.uuid}_rv", recently_viewed)
|
cache.set(f"user_{self.uuid}_rv", recently_viewed)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue