fix membership update_or_create in importer

This commit is contained in:
Andreas Madsack 2018-01-13 13:22:31 +01:00
parent 8db0bb2db3
commit e09641b212

View File

@ -155,8 +155,8 @@ def import_member(member_data):
for membership in sorted(memberships, key=lambda m: m['membership_start']):
obj, _ = Membership.objects.update_or_create(
member=member,
start=parse_date(membership['membership_start']),
defaults={
'start': parse_date(membership['membership_start']),
'amount': Decimal(membership['membership_fee_monthly'])*membership['membership_fee_interval'],
'interval': membership['membership_fee_interval'],
})