Skip to content

Commit 4cd5128

Browse files
committed
Change assertion of path from Path to str
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent c0150e9 commit 4cd5128

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scanpipe/pipes/d2d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1677,6 +1677,7 @@ def map_paths_resource(
16771677
relations_to_create = {}
16781678

16791679
for map_type in map_types:
1680+
# These are of type string
16801681
paths_in_binary = to_resource.extra_data.get(map_type, [])
16811682
paths_not_mapped = to_resource.extra_data[f"{map_type}_not_mapped"] = []
16821683
for item in process_paths_in_binary(
@@ -1686,7 +1687,7 @@ def map_paths_resource(
16861687
map_type=map_type,
16871688
paths_in_binary=paths_in_binary,
16881689
):
1689-
if isinstance(item, Path):
1690+
if isinstance(item, str):
16901691
paths_not_mapped.append(item)
16911692
else:
16921693
rel_key, relation = item

0 commit comments

Comments
 (0)