Fix backtest delete and save

This commit is contained in:
2025-07-05 12:21:32 +07:00
parent dcf0778a17
commit daef7ddcfc
4 changed files with 27 additions and 28 deletions

View File

@@ -47,11 +47,11 @@ public class BacktestRepository : IBacktestRepository
public void DeleteBacktestByIdForUser(User user, string id)
{
var backtest = _backtestRepository.FindById(id);
var backtest = _backtestRepository.FindOne(b => b.Identifier == id);
if (backtest != null && backtest.User != null && backtest.User.Name == user.Name)
{
_backtestRepository.DeleteById(id);
_backtestRepository.DeleteById(backtest.Id.ToString());
}
}