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
commit7b363faae11460af95c3faaaa51425eacf2bc4de (patch)
tree5b1a5642aca9d7f95606e19b67f283602974bdbe
parent10d15883b8bb83976483a2d4cd8587ce7fa35b2c (diff)
downloadIshtar-7b363faae11460af95c3faaaa51425eacf2bc4de.tar.bz2
Ishtar-7b363faae11460af95c3faaaa51425eacf2bc4de.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 ""