From 3e4b8a9c0428060b1bb91bb1d442eb56d4c44b1d Mon Sep 17 00:00:00 2001 From: zheneq Date: Sat, 17 Jun 2023 17:16:39 +0300 Subject: [PATCH] Minor mongo fix --- EvoS.Framework/DataAccess/Mongo/MatchHistoryMongoDao.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EvoS.Framework/DataAccess/Mongo/MatchHistoryMongoDao.cs b/EvoS.Framework/DataAccess/Mongo/MatchHistoryMongoDao.cs index b327cfb8..cf42cfdc 100644 --- a/EvoS.Framework/DataAccess/Mongo/MatchHistoryMongoDao.cs +++ b/EvoS.Framework/DataAccess/Mongo/MatchHistoryMongoDao.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using EvoS.Framework.DataAccess.Daos; +using EvoS.Framework.Misc; using EvoS.Framework.Network.Static; using MongoDB.Driver; @@ -23,7 +24,10 @@ public List Find(long accountId) public void Save(ICollection matchEntries) { - c.InsertMany(matchEntries); + if (!matchEntries.IsNullOrEmpty()) + { + c.InsertMany(matchEntries); + } } } } \ No newline at end of file