"""
Importe le poste DAE dans un poste RH existant ou nouveau.
"""
- poste_rh = self.dans_rh() or rh.Poste()
+ dans_rh = self.dans_rh()
+ poste_rh = dans_rh or rh.Poste()
poste_rh.nom = self.nom
poste_rh.implantation = self.implantation
poste_rh.type_poste = self.type_poste
poste_rh.comp_autre_min = self.comp_autre_min
poste_rh.comp_autre_max = self.comp_autre_max
poste_rh.justification = self.justification
+ if not dans_rh:
+ poste_rh.date_debut = self.date_debut
+ poste_rh.date_fin = self.date_fin
poste_rh.save()
for piece in self.dae_pieces.all():