Skip to content

Commit cd209b5

Browse files
committed
add find ID in service.context if id is missing to georeferenced map save function
1 parent 398730b commit cd209b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mapreader/download/iiif_downloader.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ def save_georeferenced_map(
166166

167167
# Get filename
168168
# host, prefix, identifier
169-
fname = ".".join(annot.id.removeprefix("https://").split("/")[2:])
169+
id = annot.resource["service"]["id"] if annot.id is None else annot.id
170+
fname = ".".join(id.removeprefix("https://").split("/")[2:])
170171

171172
if not os.path.exists(path_save):
172173
os.makedirs(path_save, exist_ok=True)

0 commit comments

Comments
 (0)