use transaction.atomic

This commit is contained in:
j 2016-02-19 21:55:09 +05:30
commit e22cc432b3
13 changed files with 19 additions and 19 deletions

View file

@ -196,7 +196,7 @@ class Entity(models.Model):
entity = get_by_id(settings.CONFIG['entities'], self.type)
if not entity:
return
with transaction.commit_on_success():
with transaction.atomic():
ids = ['name']
for key in entity['keys']:
value = self.data.get(key['id'])