summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Hislaire <nicolas.hislaire@imio.be>2020-08-11 13:42:31 (GMT)
committerNicolas Hislaire <nicolas.hislaire@imio.be>2020-08-11 13:42:31 (GMT)
commita263a830d152fd1a2ff7b12abeaf808ef0a3086b (patch)
tree28ab3c3d284f16a6030b0ef60bee0a36755413b4
parent8b025db2a9a10fd4e0a5a8a828cb5af06bc83572 (diff)
downloadpasserelle-imio-extra-fees-a263a830d152fd1a2ff7b12abeaf808ef0a3086b.zip
passerelle-imio-extra-fees-a263a830d152fd1a2ff7b12abeaf808ef0a3086b.tar.gz
passerelle-imio-extra-fees-a263a830d152fd1a2ff7b12abeaf808ef0a3086b.tar.bz2
[TELE-636] fix json loading by decoding bytes var
-rw-r--r--passerelle_imio_extra_fees/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/passerelle_imio_extra_fees/models.py b/passerelle_imio_extra_fees/models.py
index 64f8a9f..5275ce2 100644
--- a/passerelle_imio_extra_fees/models.py
+++ b/passerelle_imio_extra_fees/models.py
@@ -57,7 +57,7 @@ class ExtraFees(BaseResource):
def default_compute(self, request, **kwargs):
nb_documents = 0
nb_letter = 0
- data = json.loads(request.body)
+ data = json.loads(request.body).decode('utf-8')
postage_fee = Decimal(self.belgium_postage_fee)
for basket_item in data['data']:
try: