[import] extract all meaningfull code out of Command.handle
This commit is contained in:
parent
cae6393310
commit
8b5996b7fe
@ -146,6 +146,11 @@ def import_member(member_data):
|
|||||||
_import_transactions(member_data, member)
|
_import_transactions(member_data, member)
|
||||||
|
|
||||||
|
|
||||||
|
def import_members(data):
|
||||||
|
for member in data:
|
||||||
|
import_member(member)
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
help = 'Imports a frab xml export'
|
help = 'Imports a frab xml export'
|
||||||
|
|
||||||
@ -158,5 +163,4 @@ class Command(BaseCommand):
|
|||||||
with open(path) as export:
|
with open(path) as export:
|
||||||
data = json.load(export)
|
data = json.load(export)
|
||||||
|
|
||||||
for member in data:
|
import_members(data)
|
||||||
import_member(member)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user