From 08542121281f492511a2724e8f2c98b6c0c77d8f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 26 Mar 2025 17:27:41 +0100 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 7f0808602..11e107c01 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -2243,7 +2243,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