#1773
authorOlivier Larchevêque <olivier.larcheveque@gmail.com>
Thu, 4 Aug 2011 20:50:25 +0000 (16:50 -0400)
committerOlivier Larchevêque <olivier.larcheveque@gmail.com>
Thu, 4 Aug 2011 20:50:25 +0000 (16:50 -0400)
project/rh/lib.py

index 6d1b43e..627fb86 100644 (file)
@@ -115,13 +115,11 @@ class AyantDroitAdmin(AUFMetadataAdminMixin, admin.ModelAdmin):
     )
 
     def save_formset(self, request, form, formset, change):
     )
 
     def save_formset(self, request, form, formset, change):
-        super(AyantDroitAdmin, self).save_formset(request, form, formset, change)
         instances = formset.save(commit=False)
         for instance in instances:
             if instance.__class__ == rh.AyantDroitCommentaire:
                 instance.owner = request.user
             instance.save()
         instances = formset.save(commit=False)
         for instance in instances:
             if instance.__class__ == rh.AyantDroitCommentaire:
                 instance.owner = request.user
             instance.save()
-        formset.save_m2m()
 
     def _ayantdroit(self, obj):
         return unicode(obj)
 
     def _ayantdroit(self, obj):
         return unicode(obj)
@@ -216,13 +214,11 @@ class DossierAdmin(AUFMetadataAdminMixin, admin.ModelAdmin,):
     _employe.short_description = u'Employé'
     
     def save_formset(self, request, form, formset, change):
     _employe.short_description = u'Employé'
     
     def save_formset(self, request, form, formset, change):
-        super(DossierAdmin, self).save_formset(request, form, formset, change)
         instances = formset.save(commit=False)
         for instance in instances:
             if instance.__class__ == rh.DossierCommentaire:
                 instance.owner = request.user
             instance.save()
         instances = formset.save(commit=False)
         for instance in instances:
             if instance.__class__ == rh.DossierCommentaire:
                 instance.owner = request.user
             instance.save()
-        formset.save_m2m()
 
 class DossierPieceAdmin(admin.ModelAdmin):
     pass
 
 class DossierPieceAdmin(admin.ModelAdmin):
     pass
@@ -252,13 +248,11 @@ class EmployeAdmin(AUFMetadataAdminMixin, admin.ModelAdmin):
         )
 
     def save_formset(self, request, form, formset, change):
         )
 
     def save_formset(self, request, form, formset, change):
-        super(EmployeAdmin, self).save_formset(request, form, formset, change)
         instances = formset.save(commit=False)
         for instance in instances:
             if instance.__class__ == rh.EmployeCommentaire:
                 instance.owner = request.user
             instance.save()
         instances = formset.save(commit=False)
         for instance in instances:
             if instance.__class__ == rh.EmployeCommentaire:
                 instance.owner = request.user
             instance.save()
-        formset.save_m2m()
 
 class EmployeCommentaireAdmin(admin.ModelAdmin):
     pass
 
 class EmployeCommentaireAdmin(admin.ModelAdmin):
     pass