fix(chalice): working on a fix for reversed user-journey (reversed depth) (#3029)

This commit is contained in:
Kraiem Taha Yassine 2025-02-12 15:52:17 +01:00 committed by GitHub
parent c4c5fcc2b2
commit d70ecab1d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -89,8 +89,11 @@ def __transform_journey(rows, reverse_path=False):
link["target"] = sr_idx
links.append(link)
if reverse_path:
for n in nodes_values:
n["depth"] = max_depth - n["depth"]
return {"nodes": nodes_values,
"links": sorted(links, key=lambda x: (x["source"], x["target"]), reverse=reverse_path)}
"links": sorted(links, key=lambda x: (x["source"], x["target"]), reverse=False)}
JOURNEY_TYPES = {