Skip to content

Commit 97f0e2a

Browse files
author
Dairon Medina
committed
Fixing weight
1 parent 0289377 commit 97f0e2a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/transactions/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def post_transaction_save(sender, **kwargs):
4646
instance = kwargs.get('instance', None)
4747
created = kwargs.get('created', False)
4848
weight = instance.device.weight
49-
ticket = Docket(docket_number=instance.order_number, gross=weight, tare=weight, ind_id=1, ind_id2=2, cancelled=True)
49+
ticket = Docket(docket_number=instance.order_number, gross=weight[0], tare=weight, ind_id=1, ind_id2=2, cancelled=True)
5050

5151
ticket.save()
5252

apps/weighin/devices/drivers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ def get_weight(self):
2727
self.connection.close()
2828
alibi = raw[0:5]
2929
weight = raw[6:12]
30-
return int(alibi), D(weight)
31-
return D(0)
30+
return [int(alibi), D(weight)]
31+
return [D(0), D(0)]

0 commit comments

Comments
 (0)