{"action":"created","issue":{"url":"https://api.github.com/repos/taigaio/taiga-back/issues/468","labels_url":"https://api.github.com/repos/taigaio/taiga-back/issues/468/labels{/name}","comments_url":"https://api.github.com/repos/taigaio/taiga-back/issues/468/comments","events_url":"https://api.github.com/repos/taigaio/taiga-back/issues/468/events","html_url":"https://github.com/taigaio/taiga-back/issues/468","id":107719450,"number":468,"title":"Taiga 1.8.0: HTTP error 500 while trying to delete project as admin.","user":{"login":"kamiccolo","id":607295,"avatar_url":"https://avatars.githubusercontent.com/u/607295?v=3","gravatar_id":"","url":"https://api.github.com/users/kamiccolo","html_url":"https://github.com/kamiccolo","followers_url":"https://api.github.com/users/kamiccolo/followers","following_url":"https://api.github.com/users/kamiccolo/following{/other_user}","gists_url":"https://api.github.com/users/kamiccolo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamiccolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamiccolo/subscriptions","organizations_url":"https://api.github.com/users/kamiccolo/orgs","repos_url":"https://api.github.com/users/kamiccolo/repos","events_url":"https://api.github.com/users/kamiccolo/events{/privacy}","received_events_url":"https://api.github.com/users/kamiccolo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/taigaio/taiga-back/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-22T13:52:32Z","updated_at":"2015-09-23T10:45:21Z","closed_at":null,"body":"Using Admin Panel can't delete projects created by a user. In fact, can't delete users who had created any projects. Server throws back \"500, internal server error\". I presume, it's a problem with backend, because Python complaining about DB table integrity.\r\n\r\nRelevant `gunicorn.stderr.log` entry:\r\n```\r\nERROR:2015-09-22 13:41:38,605: Internal Server Error: /admin/users/user/\r\nTraceback (most recent call last):\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/backends/__init__.py\", line 145, in _commit\r\n    return self.connection.commit()\r\npsycopg2.IntegrityError: insert or update on table \"timeline_timeline\" violates foreign key constraint \"timeline_tim_project_id_525b3b62245de7b0_fk_projects_project_id\"\r\nDETAIL:  Key (project_id)=(1) is not present in table \"projects_project\".\r\n\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/core/handlers/base.py\", line 111, in get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/contrib/admin/options.py\", line 583, in wrapper\r\n    return self.admin_site.admin_view(view)(*args, **kwargs)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/utils/decorators.py\", line 105, in _wrapped_view\r\n    response = view_func(request, *args, **kwargs)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/views/decorators/cache.py\", line 52, in _wrapped_view_func\r\n    response = view_func(request, *args, **kwargs)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/contrib/admin/sites.py\", line 206, in inner\r\n    return view(request, *args, **kwargs)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/utils/decorators.py\", line 29, in _wrapper\r\n    return bound_func(*args, **kwargs)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/utils/decorators.py\", line 105, in _wrapped_view\r\n    response = view_func(request, *args, **kwargs)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/utils/decorators.py\", line 25, in bound_func\r\n    return func.__get__(self, type(self))(*args2, **kwargs2)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/contrib/admin/options.py\", line 1527, in changelist_view\r\n    response = self.response_action(request, queryset=cl.get_queryset(request))\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/contrib/admin/options.py\", line 1282, in response_action\r\n    response = func(self, request, queryset)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/contrib/admin/actions.py\", line 49, in delete_selected\r\n    queryset.delete()\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/query.py\", line 557, in delete\r\n    collector.delete()\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/deletion.py\", line 284, in delete\r\n    sender=model, instance=obj, using=self.using\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/transaction.py\", line 339, in __exit__\r\n    connection.commit()\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/transaction_hooks/mixin.py\", line 43, in commit\r\n    super(TransactionHooksDatabaseWrapperMixin, self).commit(*a, **kw)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/backends/__init__.py\", line 176, in commit\r\n    self._commit()\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/backends/__init__.py\", line 145, in _commit\r\n    return self.connection.commit()\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/utils.py\", line 94, in __exit__\r\n    six.reraise(dj_exc_type, dj_exc_value, traceback)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/utils/six.py\", line 658, in reraise\r\n    raise value.with_traceback(tb)\r\n  File \"/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/backends/__init__.py\", line 145, in _commit\r\n    return self.connection.commit()\r\ndjango.db.utils.IntegrityError: insert or update on table \"timeline_timeline\" violates foreign key constraint \"timeline_tim_project_id_525b3b62245de7b0_fk_projects_project_id\"\r\nDETAIL:  Key (project_id)=(1) is not present in table \"projects_project\".\r\n```"},"comment":{"url":"https://api.github.com/repos/taigaio/taiga-back/issues/comments/142563333","html_url":"https://github.com/taigaio/taiga-back/issues/468#issuecomment-142563333","issue_url":"https://api.github.com/repos/taigaio/taiga-back/issues/468","id":142563333,"user":{"login":"superalex","id":1579633,"avatar_url":"https://avatars.githubusercontent.com/u/1579633?v=3","gravatar_id":"","url":"https://api.github.com/users/superalex","html_url":"https://github.com/superalex","followers_url":"https://api.github.com/users/superalex/followers","following_url":"https://api.github.com/users/superalex/following{/other_user}","gists_url":"https://api.github.com/users/superalex/gists{/gist_id}","starred_url":"https://api.github.com/users/superalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superalex/subscriptions","organizations_url":"https://api.github.com/users/superalex/orgs","repos_url":"https://api.github.com/users/superalex/repos","events_url":"https://api.github.com/users/superalex/events{/privacy}","received_events_url":"https://api.github.com/users/superalex/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T10:45:21Z","updated_at":"2015-09-23T10:45:21Z","body":"You are welcome! ;)"}}