From 7efe436fd9b794ed585a675bf0cbaf9ff4c8464d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 20 Aug 2025 15:42:38 +0200 Subject: 🐛 fix unclosed file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ishtar_common/utils.py') diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index c503c42b9..52bcd3ddb 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -2249,7 +2249,8 @@ def generate_relation_graph( png_name = tempdir + os.path.sep + "relations.png" with open(png_name, "wb") as png_file: - svg2png(open(svg_tmp_name, "rb").read(), write_to=png_file) + with open(svg_tmp_name, "rb") as svg_tmp: + svg2png(svg_tmp.read(), write_to=png_file) with open(png_name, "rb") as png_file: django_file = File(png_file) attr = "relation_bitmap_image" + suffix -- cgit v1.2.3