Skip to content
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

delete source path after moving #634

Open
wants to merge 1 commit into
base: qa/0.x
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions storage_service/locations/models/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@
source_path = os.path.join(
self.current_location.relative_path, self.current_path
)
#get full path of origin for delete_path
source_delete_path = self.full_path

Check warning on line 493 in storage_service/locations/models/package.py

View check run for this annotation

Codecov / codecov/patch

storage_service/locations/models/package.py#L493

Added line #L493 was not covered by tests

destination_path = os.path.join(to_location.relative_path, self.current_path)

Expand Down Expand Up @@ -517,6 +519,8 @@
destination_space.post_move_from_storage_service(
destination_path, destination_path
)
#After everything is moved, delete the path at origin

Check warning on line 522 in storage_service/locations/models/package.py

View check run for this annotation

Codecov / codecov/patch

storage_service/locations/models/package.py#L522

Added line #L522 was not covered by tests
origin_space.delete_path(source_delete_path)

# If we get here everything went well, update with new location
self.current_location = to_location
Expand Down
Loading