Commit 49750604 authored by Luko van der Maas's avatar Luko van der Maas
Browse files

Merge branch 'fix/payment-obj' into 'master'

Fix registration payment object migration values

See merge request !1153
parents 6db3db12 a43f5fc8
...@@ -22,8 +22,9 @@ class Migration(migrations.Migration): ...@@ -22,8 +22,9 @@ class Migration(migrations.Migration):
amount=reg.event.price, amount=reg.event.price,
paid_by=reg.member, paid_by=reg.member,
processing_date=reg.event.start, processing_date=reg.event.start,
notes=f'Event registration {reg.event}. ' notes=f'Event registration {reg.event.title_en}'
f'Registration: {reg}' f'{reg.event.start}. '
f'Registration: {reg.date}'
) )
reg.save() reg.save()
......
...@@ -257,8 +257,9 @@ def update_registration_by_organiser(registration, member, data): ...@@ -257,8 +257,9 @@ def update_registration_by_organiser(registration, member, data):
registration.payment = Payment.objects.create( registration.payment = Payment.objects.create(
amount=registration.event.price, amount=registration.event.price,
paid_by=registration.member, paid_by=registration.member,
notes=(f'Event registration {registration.event.title_en}. ' notes=(f'Event registration {registration.event.title_en}'
f'Registration date: {registration.date}'), f'{registration.event.start}. '
f'Registration date: {registration.date}.'),
processed_by=member, processed_by=member,
type=data['payment']['type'] type=data['payment']['type']
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment