Skip to content

Commit 452a558

Browse files
committed
FIX: Do not pass None into Transaction.Service constructor
1 parent b97ec2c commit 452a558

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.7.1 : 09/02/2022
4+
5+
FIX: Do not pass `None` into `Transaction.Service` constructor
6+
37
## v0.7.0 : 09/02/2022
48

59
Transaction contains information about the service using `Transaction.Service` class.

cheddar/resources/transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, data):
2323

2424
self.amount = data['amount']
2525
self.currency = data["currency"]
26-
self.service = self.Service(data['service']) if 'service' in data else None
26+
self.service = self.Service(data['service']) if data.get('service') else None
2727

2828
self.iban = data['iban'] if 'iban' in data else None
2929
self.notes = data['notes'] if 'notes' in data else None

cheddar/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "0.7.0"
1+
VERSION = "0.7.1"

0 commit comments

Comments
 (0)