Skip to content
Snippets Groups Projects
Commit 9d0fd5d8 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

browse: Add missing origin_url query parameter in some visit URLs

Origin visits having the same date are accessed by visit ids instead
of timestamps but the generated URLs were missing the origin_url query
parameter leading to 404 errors.

Fixes #4809.
parent 1d62383c
No related branches found
No related tags found
1 merge request!1327browse: Add missing origin_url query parameter in some visit URLs
Pipeline #11080 passed
......@@ -256,10 +256,10 @@ def _origin_visits_browse(
query_params = {"origin_url": origin_url, "timestamp": url_date}
if i < len(origin_visits) - 1:
if visit["date"] == origin_visits[i + 1]["date"]:
query_params = {"visit_id": visit["visit"]}
query_params = {"origin_url": origin_url, "visit_id": visit["visit"]}
if i > 0:
if visit["date"] == origin_visits[i - 1]["date"]:
query_params = {"visit_id": visit["visit"]}
query_params = {"origin_url": origin_url, "visit_id": visit["visit"]}
snapshot = visit["snapshot"] if visit["snapshot"] else ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment