ipedrazas / taiga-docker

Docker scripts to run your own Taiga
Apache License 2.0
324 stars 115 forks source link

fixed taiga issue 272 - postgres + transactions #15

Closed rayene closed 9 years ago

rayene commented 9 years ago

https://github.com/taigaio/taiga-back/issues/272

I had an issue with the database (traceback below) and I identified the problem. It has already been fixed by taiga developers. I just ported it.

ERROR:2015-08-03 09:52:16,888: Internal Server Error: /api/v1/importer/load_dump Traceback (most recent call last): File "/usr/local/lib/python3.4/site-packages/django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, _callback_args, _callback_kwargs) File "/taiga/taiga/base/api/viewsets.py", line 81, in view return self.dispatch(request, _args, _kwargs) File "/usr/local/lib/python3.4/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view return view_func(_args, _kwargs) File "/taiga/taiga/base/api/views.py", line 420, in dispatch response = self.handle_exception(exc) File "/taiga/taiga/base/api/views.py", line 417, in dispatch response = handler(request, _args, _kwargs) File "/usr/local/lib/python3.4/site-packages/django/utils/decorators.py", line 29, in _wrapper return bound_func(_args, _kwargs) File "/usr/local/lib/python3.4/site-packages/django/db/transaction.py", line 394, in inner return func(_args, _kwargs) File "/usr/local/lib/python3.4/site-packages/django/utils/decorators.py", line 25, in bound_func return func.get(self, type(self))(_args2, *_kwargs2) File "/taiga/taiga/export_import/api.py", line 213, in load_dump project = dump_service.dict_to_project(dump, request.user.email) File "/taiga/taiga/export_import/dump_service.py", line 146, in dict_to_project store_milestones(proj, data) File "/taiga/taiga/export_import/dump_service.py", line 33, in store_milestones milestone = service.store_milestone(project, milestone_data) File "/taiga/taiga/export_import/service.py", line 258, in store_milestone serialized.save() File "/taiga/taiga/base/api/serializers.py", line 1055, in save self.object = super().save(kwargs) File "/taiga/taiga/base/api/serializers.py", line 614, in save self.save_object(self.object, kwargs) File "/taiga/taiga/base/api/serializers.py", line 1073, in save_object obj.save(*kwargs) File "/taiga/taiga/projects/milestones/models.py", line 83, in save super().save(_args, _kwargs) File "/usr/local/lib/python3.4/site-packages/django/db/models/base.py", line 589, in save force_update=force_update, update_fields=update_fields) File "/usr/local/lib/python3.4/site-packages/django/db/models/base.py", line 626, in save_base update_fields=update_fields, raw=raw, using=using) File "/usr/local/lib/python3.4/site-packages/django/dispatch/dispatcher.py", line 198, in send response = receiver(signal=self, sender=sender, named) File "/taiga/taiga/events/signal_handlers.py", line 43, in on_save_any_model connection.on_commit(emit_event) File "/usr/local/lib/python3.4/site-packages/django/db/init.py", line 40, in getattr** return getattr(connections[DEFAULT_DB_ALIAS], item) AttributeError: 'DatabaseWrapper' object has no attribute 'on_commit'

ipedrazas commented 9 years ago

Currently, these docker images are using Taiga master branch. Do you know if the transaction fix has been pushed to master in taiga?

Have you run setup.sh after adding this change?