Update get backtests

This commit is contained in:
2025-07-17 04:40:18 +07:00
parent e4de01211d
commit 6a634eafaa
3 changed files with 52 additions and 29 deletions

View File

@@ -153,7 +153,7 @@ public class BacktestRepository : IBacktestRepository
public Backtest GetBacktestByIdForUser(User user, string id)
{
var backtest = _backtestRepository.FindById(id);
var backtest = _backtestRepository.FindOne(b => b.Identifier == id);
// Check if backtest exists and belongs to the user
if (backtest != null && backtest.User != null && backtest.User.Name == user.Name)