Pass the bank id along the replay
This commit is contained in:
1 parent
9aa70eb717
commit
4a156e9d11
1 file changed
+2
-1
@@ -431,6 +431,7 @@ def rebuild(conn=None):
|
||||
conn.execute("DELETE FROM lots")
|
||||
rows = conn.execute("SELECT * FROM transactions ORDER BY date, id").fetchall()
|
||||
balances = {}
|
||||
bank_id = _bank_market_id(conn)
|
||||
for row in rows:
|
||||
tx = dict(row)
|
||||
if tx["type"] == "transfer_in" and tx["generated"]:
|
||||
@@ -438,7 +439,7 @@ def rebuild(conn=None):
|
||||
else:
|
||||
create_lots_for(tx, conn)
|
||||
consume(tx, _picks(conn, tx["id"]), conn)
|
||||
_move_kroner(balances, tx)
|
||||
_move_kroner(balances, tx, bank_id)
|
||||
conn.commit()
|
||||
finally:
|
||||
if own:
|
||||
|
||||
Reference in new issue
Block a user