fix(chalice): working on a fix for reversed user-journey (reversed depth) (#3029)
This commit is contained in:
parent
c4c5fcc2b2
commit
d70ecab1d9
1 changed files with 4 additions and 1 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue