Skip to content

Commit 005de6b

Browse files
committed
Prevent server error in note links when using private proxy (fixes #621)
1 parent 581bac5 commit 005de6b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gramps_webapi/api/html.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
from .util import get_db_handle
3434

35-
3635
ALLOWED_TAGS = [
3736
"a",
3837
"abbr",
@@ -119,6 +118,8 @@ def build_link(prop: str, handle: str, obj_class: str) -> str:
119118
obj = func(ref)
120119
except HandleError:
121120
return ""
121+
if not obj:
122+
return ""
122123
gramps_id = obj.gramps_id
123124
else:
124125
raise ValueError(f"Unexpected property: {prop}")

0 commit comments

Comments
 (0)