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

@ -17,7 +17,7 @@ class Command(BaseCommand):
def handle(self, id, height, position, **options):
position = float(position)
height = int(height)
with transaction.commit_on_success():
with transaction.atomic():
i = models.Item.objects.get(public_id=id)
path = i.frame(position, height)
if path: