Skip to content

Commit fc505f5

Browse files
committed
Add type conversion to int, when batch_size is specified via cli
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
1 parent 0dd2c5b commit fc505f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vulnerabilities/management/commands/import.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def import_data(self, names, cutoff_date):
100100
def _import_data(self, importers, cutoff_date):
101101
for importer in importers:
102102
self.stdout.write(f'Importing data from {importer.name}')
103-
batch_size = getattr(self, 'batch_size', 10)
103+
batch_size = int(getattr(self, 'batch_size', 10))
104104
ImportRunner(importer, batch_size).run(cutoff_date=cutoff_date)
105105
self.stdout.write(
106106
self.style.SUCCESS(f'Successfully imported data from {importer.name}'))

0 commit comments

Comments
 (0)