From 9998ab41186a8d92c3a1e83eaeafd7ffcc6b8f52 Mon Sep 17 00:00:00 2001 From: Danil Akhtarov Date: Sun, 24 Nov 2024 18:10:21 +0400 Subject: [PATCH] fix: fix importing from file for compressed json files --- sportorg/gui/menu/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sportorg/gui/menu/actions.py b/sportorg/gui/menu/actions.py index dda4fba9..54e4ea77 100644 --- a/sportorg/gui/menu/actions.py +++ b/sportorg/gui/menu/actions.py @@ -912,14 +912,14 @@ def execute(self): try: with open(file_name, mode=mode, encoding=def_encoding) as f: - attr = get_races_from_file(f) + attr = get_races_from_file(f, compress=use_gzip) except UnicodeDecodeError: f.close() alt_encoding = None if use_utf8 or use_gzip else "utf-8" with open(file_name, mode=mode, encoding=alt_encoding) as f: - attr = get_races_from_file(f) + attr = get_races_from_file(f, compress=use_gzip) SportOrgImportDialog(*attr).exec_() self.app.refresh()