Skip to content

Commit 4194b1f

Browse files
committed
Fixed legacy load pathway for when file_ids is an empty list not None and added a logger
1 parent 1c9d1d3 commit 4194b1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pydatalab/src/pydatalab/apps/echem/blocks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def _load(self, file_ids: list | ObjectId, reload: bool = True):
9999
}
100100

101101
# Legacy case for old single file uploads using "file_id"
102-
if self.data.get("file_id") is not None and self.data.get("file_ids") is None:
102+
if self.data.get("file_id") is not None and not self.data.get("file_ids"):
103+
LOGGER.info("Legacy file upload detected, using file_id")
103104
file_ids = [self.data["file_id"]]
104105

105106
if len(file_ids) == 1:

0 commit comments

Comments
 (0)