From 5e7e01b49f391b8c8e7d6aa57467c2cfd4bbf21f Mon Sep 17 00:00:00 2001 From: Tim-Oliver Husser Date: Thu, 28 Apr 2022 13:59:51 +0200 Subject: [PATCH] fixed bug --- pyobs_archive/api/management/commands/delete.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyobs_archive/api/management/commands/delete.py b/pyobs_archive/api/management/commands/delete.py index cd09b02..f17f1bf 100644 --- a/pyobs_archive/api/management/commands/delete.py +++ b/pyobs_archive/api/management/commands/delete.py @@ -7,7 +7,7 @@ class Command(BaseCommand): - help = 'Ingest images' + help = 'Delete images' def add_arguments(self, parser): parser.add_argument('files', type=str, nargs='+', help='Names of files to delete') @@ -17,7 +17,7 @@ def handle(self, *args, files: list = None, **options): for filename in files: frames = Frame.objects.filter(basename=filename) if len(frames) > 0: - to_delete.append(frames) + to_delete.extend(frames) if not to_delete: return @@ -25,7 +25,7 @@ def handle(self, *args, files: list = None, **options): print("Images to delete:") for d in to_delete: print(" - " + d.basename) - reply = None + reply = "X" while reply not in 'yYnN': reply = input("Delete files? [yn]")