##// END OF EJS Templates
Fixed loading of first level posts in tree view
neko259 -
r2028:4249fd1b default
parent child Browse files
Show More
@@ -312,15 +312,15 b' class Thread(models.Model):'
312 searching_for_index = True
312 searching_for_index = True
313 parent_depth = depth
313 parent_depth = depth
314
314
315 if not found_parent:
315 if not found_parent:
316 tree.append((0, reply))
316 tree.append((0, reply))
317 else:
317 else:
318 if searching_for_index:
318 if searching_for_index:
319 tree.append((parent_depth + 1, reply))
319 tree.append((parent_depth + 1, reply))
320
320
321 offset = 0
321 offset = 0
322 for last_index, parent_depth in indexes_to_insert:
322 for last_index, parent_depth in indexes_to_insert:
323 tree.insert(last_index + offset, (parent_depth + 1, reply))
323 tree.insert(last_index + offset, (parent_depth + 1, reply))
324 offset += 1
324 offset += 1
325
325
326 return tree
326 return tree
General Comments 0
You need to be logged in to leave comments. Login now