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)
197197 deletableVersionIds . AddRange ( versionIds ) ;
198198 }
199199
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."
201204 var indexesToDelete = new List < string > ( ) ;
202205 foreach ( var item in IndexData )
203206 {
Original file line number Diff line number Diff line change @@ -563,10 +563,11 @@ internal Q GetSingleValue<Q>() where Q : Node
563563
564564 using var systemAccount = new SystemAccount ( ) ;
565565
566- var user = AccessProvider . Current . GetCurrentUser ( ) ;
566+ var user = AccessProvider . Current . GetOriginalUser ( ) ;
567567
568568 var singleNode = RawData
569- . Select ( id => Node . Load < T > ( id ) )
569+ . Select ( Node . Load < T > )
570+ . Where ( node => node != null )
570571 . OfType < Q > ( )
571572 . FirstOrDefault ( node =>
572573 node . Security . HasPermission ( user , PermissionType . See ) ) ;
You can’t perform that action at this time.
0 commit comments