Skip to content

Commit

Permalink
fix: set filename using metadata when copying into digital object
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdoret committed Jan 16, 2024
1 parent 799c4a3 commit 2c8e652
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ def add_element(
If the element is part of another element, the parent metadata
will be updated."""

breakpoint()
# Copy data file to archive and update data_path in metadata
if data_file is not None:
data_path = Path(data_file)
shutil.copy(data_file, self.path / data_path.name)
element.data_path = str(data_path.name)
shutil.copy(data_file, self.path / element.data_path)

# Link element to parent element
if part_of is None:
Expand Down

0 comments on commit 2c8e652

Please sign in to comment.