1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2024-12-26 17:32:23 +00:00

make chunk an herited argument

This commit is contained in:
Pierre-antoine Comby 2020-05-18 19:38:25 +02:00
parent b1366995e0
commit 5fa63f2abe
2 changed files with 3 additions and 3 deletions

View File

@ -33,6 +33,7 @@ class ImportCommand(BaseCommand):
parser.add_argument('--nk15user', action='store', default='nk15_user', help='NK15 database owner')
parser.add_argument('-s', '--save', action='store', help="save mapping of idbde")
parser.add_argument('-m', '--map', action='store', help="import mapping of idbde")
parser.add_argument('-c', '--chunk', type=int, default=100, help="chunk size for bulk_create")
return parser

View File

@ -38,9 +38,8 @@ class Command(ImportCommand):
"""
def add_arguments(self, parser):
parser.add_argument('-a', '--alias', action='store', help="import alias")
parser.add_argument('-c', '--chunk', type=int, default=100, help="chunk size for bulk_create")
parser.add_argument('-a', '--alias', action='store_true', help="import alias")
@transaction.atomic
def import_account(self, cur, chunk_size):
"""