Organigramme, fix mauvais poste si pas occupé
authorJean-Philippe Caissy <jpcaissy@piji.ca>
Fri, 30 Mar 2012 16:56:41 +0000 (11:56 -0500)
committerJean-Philippe Caissy <jpcaissy@piji.ca>
Fri, 30 Mar 2012 16:56:41 +0000 (11:56 -0500)
project/rh/graph.py

index 3bd52c6..c4e267f 100644 (file)
@@ -26,7 +26,8 @@ def bind_poste_to_graph(graph, postes_by_id):
                     )
             label = u"%s\\n%s\\n%s" % (d.poste.nom, employes, d.poste.implantation)
         else:
-            label = u"%s\\n---\\n%s" % (d.poste.nom, d.poste.implantation)
+            poste = postes_by_id[int(n)]
+            label = u"%s\\n---\\n%s" % (poste.nom, poste.implantation)
             n.attr['fillcolor'] = 'azure4'
             n.attr['style'] = 'filled'