wrap get_frame into transaction to avoid postgres error
This commit is contained in:
parent
f0ea9c17a1
commit
573f034df2
1 changed files with 4 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.conf import settings
|
||||
from django.db import transaction
|
||||
|
||||
settings.RELOAD_CONFIG = False
|
||||
import app.monkey_patch
|
||||
|
@ -14,6 +15,7 @@ class Command(BaseCommand):
|
|||
def handle(self, id, height, position, **options):
|
||||
position = float(position)
|
||||
height = int(height)
|
||||
with transaction.commit_on_success():
|
||||
i = models.Item.objects.get(public_id=id)
|
||||
path = i.frame(position, height)
|
||||
if path:
|
||||
|
|
Loading…
Reference in a new issue