commit_unless_managed->commit

This commit is contained in:
j 2016-02-20 00:36:25 +05:30
parent 62caf55fe6
commit cc84487193
2 changed files with 2 additions and 2 deletions

View file

@ -11,4 +11,4 @@ def cron(**kwargs):
from django.db import transaction
from django.contrib.sessions.models import Session
Session.objects.filter(expire_date__lt=datetime.datetime.now()).delete()
transaction.commit_unless_managed()
transaction.commit()

View file

@ -36,5 +36,5 @@ def get_sequences(public_id):
cursor = connection.cursor()
sql = "INSERT INTO sequence_sequence (%s) VALUES %s" % (keys, ', '.join(values));
cursor.execute(sql)
transaction.commit_unless_managed()
transaction.commit()
position += stream.duration