Skip to content

Commit a84df04

Browse files
committed
Fix error while there is waypoints without waypoint_ key
1 parent cbbf0a3 commit a84df04

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

spot_wrapper/wrapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33
import math
44
import os
5+
import re
56
import time
67
import traceback
78
import typing
@@ -1630,7 +1631,7 @@ def list_graph(self, upload_path=None):
16301631
return [
16311632
v
16321633
for k, v in sorted(
1633-
ids.items(), key=lambda id: int(id[0].replace("waypoint_", ""))
1634+
ids.items(), key=lambda id: int(re.sub(r"\D", "", id[0]))
16341635
)
16351636
]
16361637

0 commit comments

Comments
 (0)