Mercurial > repos > bimib > cobraxy
changeset 340:da4f5f4a9046 draft
Uploaded
author | luca_milaz |
---|---|
date | Thu, 04 Sep 2025 12:51:12 +0000 |
parents | 1fd4e4e93c85 |
children | fe87d6fd7884 |
files | COBRAxy/utils/general_utils.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/COBRAxy/utils/general_utils.py Thu Sep 04 12:40:01 2025 +0000 +++ b/COBRAxy/utils/general_utils.py Thu Sep 04 12:51:12 2025 +0000 @@ -82,7 +82,12 @@ if hasattr(self, '_original_extension') and self._original_extension: return self._original_extension - # TODO: fix, it's the dumb pickle thing keep this behaviour if we are not dealing with XML or JSON + # For XML and JSON without original extension, use the base extension + if self == FileFormat.XML: + return "xml" + elif self == FileFormat.JSON: + return "json" + return self.value[-1] class FilePath():