1
0
Parcourir la source

Abstract doesn't work as expeted so django admin fail.
For the moment, the data are stored even if LDAP fail

Fabs il y a 11 ans
Parent
commit
19fd28a901
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      coin/models.py

+ 3 - 3
coin/models.py

@@ -18,7 +18,7 @@ class CoinLdapSyncModel(models.Model):
         raise NotImplementedError('Using CoinLdapSyncModel require '
                                   'sync_to_ldap method being implemented')
 
-    @transaction.commit_manually
+    #@transaction.commit_manually
     def save(self, *args, **kwargs):
         # Détermine si on est dans une création ou une mise à jour
         creation = (self.pk == None)
@@ -32,10 +32,10 @@ class CoinLdapSyncModel(models.Model):
         try:
             self.sync_with_ldap(creation)
         except:
-            transaction.rollback()
+            #transaction.rollback()
             raise
         else:
-            transaction.commit()
+            #transaction.commit()
 
     class Meta:
         abstract = True