Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
thusser committed Apr 28, 2022
1 parent fd59021 commit 5e7e01b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyobs_archive/api/management/commands/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -17,15 +17,15 @@ 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

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]")

Expand Down

0 comments on commit 5e7e01b

Please sign in to comment.