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")
|
conn.execute("DELETE FROM lots")
|
||||||
rows = conn.execute("SELECT * FROM transactions ORDER BY date, id").fetchall()
|
rows = conn.execute("SELECT * FROM transactions ORDER BY date, id").fetchall()
|
||||||
balances = {}
|
balances = {}
|
||||||
|
bank_id = _bank_market_id(conn)
|
||||||
for row in rows:
|
for row in rows:
|
||||||
tx = dict(row)
|
tx = dict(row)
|
||||||
if tx["type"] == "transfer_in" and tx["generated"]:
|
if tx["type"] == "transfer_in" and tx["generated"]:
|
||||||
@@ -438,7 +439,7 @@ def rebuild(conn=None):
|
|||||||
else:
|
else:
|
||||||
create_lots_for(tx, conn)
|
create_lots_for(tx, conn)
|
||||||
consume(tx, _picks(conn, tx["id"]), conn)
|
consume(tx, _picks(conn, tx["id"]), conn)
|
||||||
_move_kroner(balances, tx)
|
_move_kroner(balances, tx, bank_id)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
finally:
|
finally:
|
||||||
if own:
|
if own:
|
||||||
|
|||||||
Reference in new issue
Block a user