Closed GoogleCodeExporter closed 9 years ago
Obviously the patch is for another issue. I suppose you mean this one instead?
https://github.com/hyperweek/django-modeltranslation/commit/f49a4ee229031aab2cd4
e549b26198f0c758761d
Original comment by eschler
on 28 Jun 2011 at 9:12
You're true. My bad for the copy/paste fail...
Original comment by sebast...@hyperweek.com
on 28 Jun 2011 at 9:33
Running the management command without changing the LANGUAGES setting raises a
TransactionManagementError here. I'm using MySQL.
{{{
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/path/to/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/path/to/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/path/to/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/path/to/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/path/to/cms/contrib/modeltranslation/management/commands/sync_translation_fields.py", line 87, in handle
transaction.leave_transaction_management()
File "/path/to/django/db/transaction.py", line 56, in leave_transaction_management
connection.leave_transaction_management()
File "/path/to/django/db/backends/__init__.py", line 115, in leave_transaction_management
raise TransactionManagementError("Transaction managed block ended with "
django.db.transaction.TransactionManagementError: Transaction managed block
ended with pending COMMIT/ROLLBACK
}}}
Original comment by desch...@newmediayuppies.com
on 30 Jun 2011 at 9:54
Yep, transaction management has changed in Django 1.3.
Here is the patch :
https://github.com/hyperweek/django-modeltranslation/commit/552d74ee93a1a1372585
006518289abd023c006b.
Cheers,
Original comment by sebastie...@gmail.com
on 30 Jun 2011 at 9:57
Original comment by eschler
on 10 Jul 2012 at 9:13
This issue was closed by revision r149.
Original comment by eschler
on 11 Jul 2012 at 12:57
Original comment by eschler
on 11 Jul 2012 at 12:58
The management command is in trunk now. Thanks for your help!
Please note, that i had to pass the connection to db_type in get_sync_sql to
make it work with Django 1.4. Yet have to check if this breaks anything in
older versions...
Original comment by eschler
on 11 Jul 2012 at 1:01
Original issue reported on code.google.com by
sebast...@hyperweek.com
on 27 Jun 2011 at 3:11