{"action":"created","issue":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2792","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2792/labels{/name}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2792/comments","events_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2792/events","html_url":"https://github.com/zestedesavoir/zds-site/issues/2792","id":85062317,"number":2792,"title":"On ne peut plus indexer de tutoriels","user":{"login":"pierre-24","id":7889675,"avatar_url":"https://avatars.githubusercontent.com/u/7889675?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre-24","html_url":"https://github.com/pierre-24","followers_url":"https://api.github.com/users/pierre-24/followers","following_url":"https://api.github.com/users/pierre-24/following{/other_user}","gists_url":"https://api.github.com/users/pierre-24/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre-24/subscriptions","organizations_url":"https://api.github.com/users/pierre-24/orgs","repos_url":"https://api.github.com/users/pierre-24/repos","events_url":"https://api.github.com/users/pierre-24/events{/privacy}","received_events_url":"https://api.github.com/users/pierre-24/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zestedesavoir/zds-site/labels/Back","name":"Back","color":"207de5"},{"url":"https://api.github.com/repos/zestedesavoir/zds-site/labels/BUG","name":"BUG","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-04T11:56:36Z","updated_at":"2015-06-04T12:14:39Z","closed_at":null,"body":"Quand on indexe un tutoriel publié, on obtient cette erreur:\r\n\r\n```bash\r\n$ python manage.py rebuild_index\r\n\r\nWARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.\r\nYour choices after this are to restore from backups or rebuild via the `rebuild_index` command.\r\nAre you sure you wish to continue? [y/N] y\r\nRemoving all documents from your index because you said so.\r\nAll documents removed.\r\nIndexing 3 Articles\r\nIndexing 4 Sujets\r\nIndexing 5 posts\r\nIndexing 6 Tutoriels\r\nTraceback (most recent call last):\r\n  File \"manage.py\", line 11, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/django/core/management/__init__.py\", line 385, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/django/core/management/__init__.py\", line 377, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/django/core/management/base.py\", line 288, in run_from_argv\r\n    self.execute(*args, **options.__dict__)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/management/commands/rebuild_index.py\", line 16, in handle\r\n    call_command('update_index', **options)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/django/core/management/__init__.py\", line 115, in call_command\r\n    return klass.execute(*args, **defaults)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 184, in handle\r\n    return super(Command, self).handle(*items, **options)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/django/core/management/base.py\", line 503, in handle\r\n    label_output = self.handle_label(label, **options)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 189, in handle_label\r\n    self.update_backend(label, using)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 234, in update_backend\r\n    do_update(backend, index, qs, start, end, total, self.verbosity)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 89, in do_update\r\n    backend.update(index, current_qs)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/backends/solr_backend.py\", line 54, in update\r\n    docs.append(index.full_prepare(obj))\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/indexes.py\", line 207, in full_prepare\r\n    self.prepared_data = self.prepare(obj)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/indexes.py\", line 198, in prepare\r\n    self.prepared_data[field.index_fieldname] = field.prepare(obj)\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/fields.py\", line 159, in prepare\r\n    return self.convert(super(CharField, self).prepare(obj))\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/haystack/fields.py\", line 106, in prepare\r\n    return current_object()\r\n  File \"/home/pbeaujea/Devels/zds-site/zdsenv/local/lib/python2.7/site-packages/django/db/models/fields/related.py\", line 843, in __call__\r\n    manager = getattr(self.model, kwargs.pop('manager'))\r\nKeyError: u'manager'\r\n```\r\n\r\nJ'ajoute que si le tuto est vide, ça ne change rien, donc l'erreur ne vient pas de l'indexation des parties ou chapitre.\r\n\r\nC'est même potentiellement bloquant."},"comment":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/comments/108866404","html_url":"https://github.com/zestedesavoir/zds-site/issues/2792#issuecomment-108866404","issue_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2792","id":108866404,"user":{"login":"pierre-24","id":7889675,"avatar_url":"https://avatars.githubusercontent.com/u/7889675?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre-24","html_url":"https://github.com/pierre-24","followers_url":"https://api.github.com/users/pierre-24/followers","following_url":"https://api.github.com/users/pierre-24/following{/other_user}","gists_url":"https://api.github.com/users/pierre-24/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre-24/subscriptions","organizations_url":"https://api.github.com/users/pierre-24/orgs","repos_url":"https://api.github.com/users/pierre-24/repos","events_url":"https://api.github.com/users/pierre-24/events{/privacy}","received_events_url":"https://api.github.com/users/pierre-24/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T12:14:39Z","updated_at":"2015-06-04T12:14:39Z","body":"Non, j'ai testé en créant un mini-tuto vide à la main."}}