diff --git a/management/commands/import_nk15.py b/management/commands/import_nk15.py index f85204a..519a1b5 100644 --- a/management/commands/import_nk15.py +++ b/management/commands/import_nk15.py @@ -15,4 +15,4 @@ class Command(BaseCommand): call_command('import_account', alias=True, chunk=5000, save = "map.json") call_command('import_activities', chunk=5000, map="map.json") call_command('import_transaction', chunk=5000, buttons=True, map="map.json") - call_command('make_su', 'Coq', 'erdnaxe', 'PAC', 'Pollion', 'ÿnérant') + call_command('make_su','-sS', 'Coq', 'erdnaxe', 'PAC', 'Pollion', 'ÿnérant') diff --git a/management/commands/import_transaction.py b/management/commands/import_transaction.py index d109bbf..0d7d9e8 100644 --- a/management/commands/import_transaction.py +++ b/management/commands/import_transaction.py @@ -267,10 +267,10 @@ class Command(ImportCommand): membership_ids = Membership.objects.values_list('id',flat=True) for m_id in membership_ids: bulk_mgr.add( - Membership.roles.trough(membership_id=m_id,role_id=BDE_ROLE_PK), - Membership.roles.trough(membership_id=m_id,role_id=KFET_ROLE_PK), + Membership.roles.through(membership_id=m_id,role_id=BDE_ROLE_PK), + Membership.roles.through(membership_id=m_id,role_id=KFET_ROLE_PK), ) - bulk_mgr.done() + bulk_mgr.done() @timed def handle(self, *args, **kwargs): @@ -284,3 +284,4 @@ class Command(ImportCommand): self.load_map(kwargs["map"]) self.import_buttons(cur, kwargs["chunk"]) self.import_transaction(cur, kwargs["chunk"], 0) + self.set_roles()