changeset 341:fe87d6fd7884 draft

Uploaded
author luca_milaz
date Thu, 04 Sep 2025 13:03:21 +0000
parents da4f5f4a9046
children 057909a104d9
files COBRAxy/utils/general_utils.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/COBRAxy/utils/general_utils.py	Thu Sep 04 12:51:12 2025 +0000
+++ b/COBRAxy/utils/general_utils.py	Thu Sep 04 13:03:21 2025 +0000
@@ -606,10 +606,10 @@
     def load_custom_model(self, file_path :FilePath, ext :Optional[FileFormat] = None) -> cobra.Model:
         ext = ext if ext else file_path.ext
         try:
-            if ext in FileFormat.XML:
+            if str(ext) in FileFormat.XML.value:
                 return cobra.io.read_sbml_model(file_path.show())
             
-            if ext in FileFormat.JSON:
+            if str(ext) in FileFormat.JSON.value:
                 # Compressed files are not automatically handled by cobra
                 if(ext == "json"):
                     return cobra.io.load_json_model(file_path.show())