client-barcode: Allow empty commit (bug #17, broken by introduction of bulkbuy)

This commit is contained in:
Sebastian Pipping 2011-10-26 17:49:53 +02:00
parent 64ce18cb74
commit 621f8017c8
1 changed files with 6 additions and 0 deletions

View File

@ -268,6 +268,9 @@ class Status:
assert(self.logged_in())
def compress_deposit_commands():
if not self.transfers:
return
dummy, initial_balance = self.transfers[0]
balance_before = initial_balance
compressed_deposit = DepositCommand(Decimal('0'))
@ -283,6 +286,9 @@ class Status:
self.transfers = others
def process_buy_commands_combined():
if not self.transfers:
return
# Compress BuyCommands, use a single bulkbuy
dummy, initial_balance = self.transfers[0]
balance_before = initial_balance