|
@@ -18,7 +18,7 @@ class CoinLdapSyncModel(models.Model):
|
|
|
raise NotImplementedError('Using CoinLdapSyncModel require '
|
|
|
'sync_to_ldap method being implemented')
|
|
|
|
|
|
- #@transaction.commit_manually
|
|
|
+ @transaction.atomic
|
|
|
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,7 @@ class CoinLdapSyncModel(models.Model):
|
|
|
try:
|
|
|
self.sync_with_ldap(creation)
|
|
|
except:
|
|
|
- #transaction.rollback()
|
|
|
raise
|
|
|
- else:
|
|
|
- #transaction.commit()
|
|
|
|
|
|
class Meta:
|
|
|
abstract = True
|