"Update portfolio" fail after import of action from Trading212
I have imported bunch of activities from Trading212 (3 years). Then the portfolio value and chart is not calculated with this error: [2025-05-04][06:46:04][webview:onError@tauri://localhost/assets/index-DXN2InWB.js:42:5706][ERROR] Error calculating historical data: Database operation failed: Database query failed: NOT NULL constraint failed: portfolio_history.book_cost
Ah yes I've had this error also a couple of times during dev work.
For reference I was working with cryptocurrencies. The issue there was that I was casting a BigDecimal to f64 datatype. In my case I had to many decimals that could not be converted to f64. For some reason the book_cost is set to NULL or NAN.
I expect something simular happend here. We'll probably need to refactor the way the book_cost is calculated a bit to prevent this from happening in the future!
Can you please check if you still have the issue after updating to v1.1.1.
Yes and no. The error is not there any more, but but the Dashboard shows "0$". It is the same issue as https://github.com/afadil/wealthfolio/issues/256