File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
ContentRepository.InMemory Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,10 @@ public void Delete(SnTerm term)
197
197
deletableVersionIds . AddRange ( versionIds ) ;
198
198
}
199
199
200
- // delete all version ids in any depth
200
+ // Delete all version ids in any depth
201
+ // The class is not thread safe. Sometimes there is an
202
+ // InvalidOperationException in the following "foreach" cycle:
203
+ // "Collection was modified; enumeration operation may not execute."
201
204
var indexesToDelete = new List < string > ( ) ;
202
205
foreach ( var item in IndexData )
203
206
{
Original file line number Diff line number Diff line change @@ -563,10 +563,11 @@ internal Q GetSingleValue<Q>() where Q : Node
563
563
564
564
using var systemAccount = new SystemAccount ( ) ;
565
565
566
- var user = AccessProvider . Current . GetCurrentUser ( ) ;
566
+ var user = AccessProvider . Current . GetOriginalUser ( ) ;
567
567
568
568
var singleNode = RawData
569
- . Select ( id => Node . Load < T > ( id ) )
569
+ . Select ( Node . Load < T > )
570
+ . Where ( node => node != null )
570
571
. OfType < Q > ( )
571
572
. FirstOrDefault ( node =>
572
573
node . Security . HasPermission ( user , PermissionType . See ) ) ;
You can’t perform that action at this time.
0 commit comments