fix(graph-parser): avoid parsing illegal id

pull/5557/head
Andelf 2022-06-05 13:41:42 +08:00 committed by Tienson Qin
parent 03c3a413c9
commit 333017235b
1 changed files with 2 additions and 1 deletions

View File

@ -431,7 +431,8 @@
(or (when-let [custom-id (or (get-in properties [:properties :custom-id])
(get-in properties [:properties :custom_id])
(get-in properties [:properties :id]))]
(let [custom-id (and (string? custom-id) (string/trim custom-id))]
;; guard against non-string custom-ids
(when-let [custom-id (and (string? custom-id) (string/trim custom-id))]
(some-> custom-id parse-uuid)))
(d/squuid)))