diff --git a/src/Managing.Infrastructure.Database/PostgreSql/AgentSummaryRepository.cs b/src/Managing.Infrastructure.Database/PostgreSql/AgentSummaryRepository.cs index 160999bb..d2798de1 100644 --- a/src/Managing.Infrastructure.Database/PostgreSql/AgentSummaryRepository.cs +++ b/src/Managing.Infrastructure.Database/PostgreSql/AgentSummaryRepository.cs @@ -276,7 +276,8 @@ public class AgentSummaryRepository : IAgentSummaryRepository entity.TotalVolume = domain.TotalVolume; entity.TotalBalance = domain.TotalBalance; entity.TotalFees = domain.TotalFees; - entity.BacktestCount = domain.BacktestCount; + // BacktestCount is NOT updated here - it's managed independently via IncrementBacktestCountAsync + // This prevents other update operations from overwriting the BacktestCount } private static AgentSummary MapToDomain(AgentSummaryEntity entity)