summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-05-17 16:38:44 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:50 +0200
commit0e52851c91f4104e28cd2abc58538380d33c2f6c (patch)
tree5b1a5642aca9d7f95606e19b67f283602974bdbe
parent213bf72a9dd696b9dd1c3211250aa9f6b5febc57 (diff)
downloadIshtar-0e52851c91f4104e28cd2abc58538380d33c2f6c.tar.bz2
Ishtar-0e52851c91f4104e28cd2abc58538380d33c2f6c.zip
Sheet: silently fails when missing graph relations image is missing
-rw-r--r--CHANGES-DEV.md1
-rw-r--r--ishtar_common/templatetags/ishtar_helpers.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES-DEV.md b/CHANGES-DEV.md
index f9fd9e686..48fbd3b59 100644
--- a/CHANGES-DEV.md
+++ b/CHANGES-DEV.md
@@ -43,4 +43,5 @@ Ishtar develop changelog v3.2
- Search: fix url for person and organization
- Geo: use own precise multipolygone centroid before parent precise point
- Many to one treatment: fix attribute conservation
+- Sheet: silently fails when missing graph relations image is missing
diff --git a/ishtar_common/templatetags/ishtar_helpers.py b/ishtar_common/templatetags/ishtar_helpers.py
index 282f35521..375f80ae7 100644
--- a/ishtar_common/templatetags/ishtar_helpers.py
+++ b/ishtar_common/templatetags/ishtar_helpers.py
@@ -36,7 +36,10 @@ def safe_or(item, args):
@register.filter
def file_content(value):
if value:
- return mark_safe(value.read())
+ try:
+ return mark_safe(value.read())
+ except FileNotFoundError:
+ pass
return ""