@@ -34,9 +34,11 @@ def skipPathSequence(self, counter, items, level):
3434 counter = counter + 1
3535 return counter
3636
37- def getPathSequenceChildren (self , counter , written_sequences , items , elements_dict , level , built_sequences , src ):
37+ def getPathSequenceChildren (self , counter , written_sequences , items , elements_dict , level , built_sequences , src , cache_session ):
3838 children = []
39+ queries = self .queries
3940 cache = self .cache
41+
4042 while (counter < len (items ) and items [counter ].lvl == level ):
4143 elem = elements_dict [items [counter ].id_pae ]
4244 item = Pathitem (items [counter ].id_pae , elem .name , items [counter ].id_pathid , elem .paetype , items [counter ].id_parent , items [counter ].lvl , items [counter ].order , items [counter ].operator )
@@ -55,13 +57,13 @@ def getPathSequenceChildren(self, counter, written_sequences, items, elements_di
5557 if item .paetype == 2 :
5658 if item .name in written_sequences :
5759 item .expanded = False
58- counter , new_children , written_sequences , built_sequences = self .getPathSequenceChildren (counter , written_sequences , items , elements_dict , item .lvl + 1 , built_sequences , src )
60+ counter , new_children , written_sequences , built_sequences = self .getPathSequenceChildren (counter , written_sequences , items , elements_dict , item .lvl + 1 , built_sequences , src , cache_session )
5961 for child in new_children :
6062 item .children .append (child )
6163
6264 else :
6365 item .expanded = False
64- counter , new_children , written_sequences , built_sequences = self .getPathSequenceChildren (counter , written_sequences , items , elements_dict , item .lvl + 1 , built_sequences , src )
66+ counter , new_children , written_sequences , built_sequences = self .getPathSequenceChildren (counter , written_sequences , items , elements_dict , item .lvl + 1 , built_sequences , src , cache_session )
6567 for child in new_children :
6668 item .children .append (child )
6769
@@ -165,7 +167,7 @@ def getPathItems(self, gid=-2, ver=-2, db = None, log = None, src = 0, request =
165167 if item .name in written_sequences :
166168 counter = self .skipPathSequence (counter , items , item .lvl + 1 )
167169 else :
168- counter , new_children , written_sequences , built_sequences = self .getPathSequenceChildren (counter , written_sequences , items , elements_dict , item .lvl + 1 , built_sequences , src )
170+ counter , new_children , written_sequences , built_sequences = self .getPathSequenceChildren (counter , written_sequences , items , elements_dict , item .lvl + 1 , built_sequences , src , cache_session )
169171 for child in new_children :
170172
171173 item .children .append (child )
@@ -303,7 +305,7 @@ def getEndPathItems(self, gid=-2, ver=-2, db = None, log = None, request = None,
303305 if item .name in written_sequences :
304306 counter = self .skipPathSequence (counter , items , item .lvl + 1 )
305307 else :
306- counter , new_children , written_sequences , built_sequences = self .getPathSequenceChildren (counter , written_sequences , items , elements_dict , item .lvl + 1 , built_sequences , src )
308+ counter , new_children , written_sequences , built_sequences = self .getPathSequenceChildren (counter , written_sequences , items , elements_dict , item .lvl + 1 , built_sequences , src , cache_session )
307309 for child in new_children :
308310
309311 item .children .append (child )
0 commit comments