Fix import PayPal capitalization bug
This commit is contained in:
parent
c865480c8b
commit
202dc1f999
|
@ -118,7 +118,11 @@ for o in old:
|
||||||
new = {}
|
new = {}
|
||||||
|
|
||||||
for f in TRANSACTION_FIELDS:
|
for f in TRANSACTION_FIELDS:
|
||||||
new[f] = o.__dict__.get(f, None).replace('Paypal', 'PayPal')
|
tmp = o.__dict__.get(f, None)
|
||||||
|
if isinstance(tmp, str):
|
||||||
|
new[f] = tmp.replace('Paypal', 'PayPal')
|
||||||
|
else:
|
||||||
|
new[f] = tmp
|
||||||
|
|
||||||
models.Transaction.objects.create(**new)
|
models.Transaction.objects.create(**new)
|
||||||
print('Imported transaction #{} - {} {}'.format(
|
print('Imported transaction #{} - {} {}'.format(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user