diff --git a/django_airavata/apps/admin/management/commands/archive_user_data.py b/django_airavata/apps/admin/management/commands/archive_user_data.py index a79b1bcc8..bab8be533 100644 --- a/django_airavata/apps/admin/management/commands/archive_user_data.py +++ b/django_airavata/apps/admin/management/commands/archive_user_data.py @@ -104,8 +104,10 @@ def handle(self, *args, **options): archive_path = archive_path.strip() if os.path.isfile(archive_path): os.remove(archive_path) - else: + elif os.path.isdir(archive_path): shutil.rmtree(archive_path) + else: + self.stdout.write(self.style.WARNING(f"Cannot delete {archive_path} as it is neither a file nor directory, perhaps was already removed")) archive_entry = models.UserDataArchiveEntry(user_data_archive=user_data_archive, entry_path=archive_path) archive_entry.save() except Exception as e: diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/ExperimentStorageViewContainer.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/ExperimentStorageViewContainer.vue index 8868ed814..3c106d106 100644 --- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/ExperimentStorageViewContainer.vue +++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/ExperimentStorageViewContainer.vue @@ -29,10 +29,10 @@ Experiment Data Directory does not exist in storage. - +