Skip to content

Commit

Permalink
Fix command log
Browse files Browse the repository at this point in the history
  • Loading branch information
cslzchen committed Jan 14, 2025
1 parent 5dd6b36 commit 98e9236
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions osf/management/commands/migrate_non_versioned_preprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def handle(self, *args, **options):
GuidVersionsThrough.objects.bulk_create(vq_list, batch_size=len(vq_list))
total_migrated += len(vq_list)
vq_list = []
success_message = f'Migration completed successfully! [{total_migrated}] preprints have been migrated.'
if dry_run:
self.stdout.write(self.style.WARNING('DRY_RUN: Migration has completed successfully! {total_migrated} preprint(s) has been migrated.'))
self.stdout.write(self.style.WARNING(f'DRY_RUN: {success_message}'))
else:
self.stdout.write(self.style.SUCCESS('Migration completed successfully! {total_migrated} preprint(s) have been migrated.'))
self.stdout.write(self.style.SUCCESS(success_message))

0 comments on commit 98e9236

Please sign in to comment.