fix transactions for give_personas_versions (bug 651995)
This commit is contained in:
Родитель
3fe0e774d3
Коммит
b3fbd91234
|
@ -393,9 +393,10 @@ def _group_addons(qs):
|
|||
|
||||
|
||||
@cronjobs.register
|
||||
@transaction.commit_on_success
|
||||
def give_personas_versions():
|
||||
cursor = connections['default'].cursor()
|
||||
path = os.path.join(settings.ROOT, 'migrations/149-personas-versions.sql')
|
||||
with open(path) as f:
|
||||
cursor.execute(f.read())
|
||||
transaction.commit_unless_managed()
|
||||
log.info('Gave versions to %s personas.' % cursor.rowcount)
|
||||
|
|
Загрузка…
Ссылка в новой задаче