Skip to content

Commit 623fa2c

Browse files
authored
Merge pull request #192 from sbs2001/fix-cli
Add type conversion to int for batch_size , when batch_size is specified via cli
2 parents 0dd2c5b + fc505f5 commit 623fa2c

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)