[#3098] Bugfix
authorEric Mc Sween <eric.mcsween@auf.org>
Mon, 14 May 2012 20:45:20 +0000 (16:45 -0400)
committerEric Mc Sween <eric.mcsween@auf.org>
Mon, 14 May 2012 20:45:20 +0000 (16:45 -0400)
project/rh/masse_salariale.py

index 2b47055..22b1c63 100644 (file)
@@ -307,9 +307,12 @@ class MasseSalariale():
             dossiers = item['dossiers']
             remuns = item['remunerations']
 
+            if not dossiers:
+                continue
+            dossier = list(dossiers)[0]
             for d in dossiers:
                 if d.principal:
-                    dossier = list(dossiers)[0]
+                    dossier = d
 
             regime = (float(dossier.regime_travail) / 100)