Skip to content

[FL-71][FLPY-71] Only store the filename after the file content is extracted from the BET file #1139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions flow360/component/simulation/models/volume_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def _extract_content(cls, input_data):

file_content = get_file_content(input_data["file_path"])

return {"file_path": input_data["file_path"], "content": file_content}
return {"file_path": os.path.basename(input_data["file_path"]), "content": file_content}


class AuxiliaryPolarFile(BETSingleInputFileBaseModel):
Expand Down Expand Up @@ -594,7 +594,11 @@ def _extract_content(cls, input_data):
polar_file_obj_list.append(
[{"file_path": os.path.join(file_dir, file_name)} for file_name in file_name_list]
)
return {"file_path": file_path, "content": file_content, "polar_files": polar_file_obj_list}
return {
"file_path": os.path.basename(file_path),
"content": file_content,
"polar_files": polar_file_obj_list,
}


class XROTORFile(BETSingleInputFileBaseModel):
Expand Down