瀏覽代碼

bugfix: the node order was sometime creating side-effect bugs

damien 11 年之前
父節點
當前提交
3cdb4066d4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      pboard/pboard/lib/dbapi.py

+ 2 - 2
pboard/pboard/lib/dbapi.py 查看文件

98
       loTreeList.append(loNode)
98
       loTreeList.append(loNode)
99
     else:
99
     else:
100
       # append the node to the parent list
100
       # append the node to the parent list
101
-      print "here he go ", loNode.parent_id
102
-      print loTmpDict
103
       # FIXME - D.A - 2013-10-08
101
       # FIXME - D.A - 2013-10-08
104
       # The following line may raise an exception
102
       # The following line may raise an exception
105
       # We suppose that the parent node has already been added
103
       # We suppose that the parent node has already been added
106
       # this *should* be the case, but the code does not check it
104
       # this *should* be the case, but the code does not check it
105
+      if loTmpDict.has_key(loNode.parent_id)==False:
106
+        loTmpDict[loNode.parent_id] = getNode(loNode.parent_id)
107
       loTmpDict[loNode.parent_id].appendStaticChild(loNode)
107
       loTmpDict[loNode.parent_id].appendStaticChild(loNode)
108
 
108
 
109
   print "=================="
109
   print "=================="