diff --git a/pyobs_archive/api/management/commands/delete.py b/pyobs_archive/api/management/commands/delete.py index 8a89cc3..cd09b02 100644 --- a/pyobs_archive/api/management/commands/delete.py +++ b/pyobs_archive/api/management/commands/delete.py @@ -35,7 +35,7 @@ def handle(self, *args, files: list = None, **options): for d in to_delete: # get filename root = settings.ARCHIVE_ROOT - filename = os.path.join(root, frame.path, frame.basename + '.fits.fz') + filename = os.path.join(root, d.path, d.basename + '.fits.fz') # delete file os.remove(filename)