Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmegatelo committed Dec 15, 2024
1 parent 57df94d commit 6293210
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions feed/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ def try_process_viewed_session(request, url_name):
if key.startswith("viewed_"):
request.session.delete(key)
request.session[session_key] = []
for item in get_viewed_qs(request).feed_items.all():
request.session[session_key].append(item.pk)
print("Viewed items in the session: ", request.session[session_key])
viewed = get_viewed_qs(request)
if viewed:
for item in viewed.feed_items.all():
request.session[session_key].append(item.pk)

def get_processed_response(request):
resolved = resolve(request.path)
Expand Down

0 comments on commit 6293210

Please sign in to comment.