Fix backtest delete and save
This commit is contained in:
@@ -22,5 +22,6 @@ namespace Managing.Infrastructure.Databases.MongoDb.Collections
|
||||
public UserDto User { get; set; }
|
||||
public PerformanceMetrics Statistics { get; set; }
|
||||
public double Score { get; set; }
|
||||
public string Identifier { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ using Managing.Domain.Users;
|
||||
using Managing.Domain.Workers;
|
||||
using Managing.Domain.Workflows.Synthetics;
|
||||
using Managing.Infrastructure.Databases.MongoDb.Collections;
|
||||
using MongoDB.Bson;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.Databases.MongoDb;
|
||||
@@ -145,7 +144,7 @@ public static class MongoMappers
|
||||
WinRate = b.WinRate,
|
||||
GrowthPercentage = b.GrowthPercentage,
|
||||
HodlPercentage = b.HodlPercentage,
|
||||
Id = b.Id.ToString(),
|
||||
Id = b.Identifier,
|
||||
OptimizedMoneyManagement = Map(b.OptimizedMoneyManagement),
|
||||
User = Map(b.User),
|
||||
Statistics = b.Statistics,
|
||||
@@ -164,7 +163,7 @@ public static class MongoMappers
|
||||
|
||||
return new BacktestDto
|
||||
{
|
||||
Id = (!string.IsNullOrEmpty(result.Id)) ? ObjectId.Parse(result.Id) : ObjectId.GenerateNewId(),
|
||||
Identifier = result.Id,
|
||||
FinalPnl = result.FinalPnl,
|
||||
WinRate = result.WinRate,
|
||||
GrowthPercentage = result.GrowthPercentage,
|
||||
|
||||
Reference in New Issue
Block a user