{"action":"created","issue":{"url":"https://api.github.com/repos/etianen/django-watson/issues/110","labels_url":"https://api.github.com/repos/etianen/django-watson/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/etianen/django-watson/issues/110/comments","events_url":"https://api.github.com/repos/etianen/django-watson/issues/110/events","html_url":"https://github.com/etianen/django-watson/issues/110","id":69602011,"number":110,"title":"buildwatson - watson.registration.SearchAdapterError behind two related fields","user":{"login":"bykof","id":5264141,"avatar_url":"https://avatars.githubusercontent.com/u/5264141?v=3","gravatar_id":"","url":"https://api.github.com/users/bykof","html_url":"https://github.com/bykof","followers_url":"https://api.github.com/users/bykof/followers","following_url":"https://api.github.com/users/bykof/following{/other_user}","gists_url":"https://api.github.com/users/bykof/gists{/gist_id}","starred_url":"https://api.github.com/users/bykof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bykof/subscriptions","organizations_url":"https://api.github.com/users/bykof/orgs","repos_url":"https://api.github.com/users/bykof/repos","events_url":"https://api.github.com/users/bykof/events{/privacy}","received_events_url":"https://api.github.com/users/bykof/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-20T14:38:39Z","updated_at":"2015-04-22T11:27:32Z","closed_at":null,"body":"Hello etianen,\r\n\r\nI love watson, it is great and fast. But since my last deployment I have a big problem.\r\nMy problem is that I have a model which have a Foreignkey on another model. But I would like to search in this \"another\" model. The problem is that this \"another\" model can be null.\r\nSo this type of register doesn't work: \r\n```\r\nwatson.register(\r\n    ServiceInvoiceCase,\r\n    fields=(\r\n        'pj_invoice__pj_customer__name',\r\n        'pj_invoice__pj_customer__customer_id',\r\n    ),\r\n)\r\n```\r\n\r\nI get this error\r\n```\r\nwatson.registration.SearchAdapterError: Could not find a property called u'pj_customer' on either <PjInvoice: 615> or <watson.registration.CustomSearchAdapter object at 0x107e01dd0>\r\n```\r\n\r\nCan you help me please? \r\nThank you very much!"},"comment":{"url":"https://api.github.com/repos/etianen/django-watson/issues/comments/95144462","html_url":"https://github.com/etianen/django-watson/issues/110#issuecomment-95144462","issue_url":"https://api.github.com/repos/etianen/django-watson/issues/110","id":95144462,"user":{"login":"bykof","id":5264141,"avatar_url":"https://avatars.githubusercontent.com/u/5264141?v=3","gravatar_id":"","url":"https://api.github.com/users/bykof","html_url":"https://github.com/bykof","followers_url":"https://api.github.com/users/bykof/followers","following_url":"https://api.github.com/users/bykof/following{/other_user}","gists_url":"https://api.github.com/users/bykof/gists{/gist_id}","starred_url":"https://api.github.com/users/bykof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bykof/subscriptions","organizations_url":"https://api.github.com/users/bykof/orgs","repos_url":"https://api.github.com/users/bykof/repos","events_url":"https://api.github.com/users/bykof/events{/privacy}","received_events_url":"https://api.github.com/users/bykof/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T11:27:32Z","updated_at":"2015-04-22T11:27:32Z","body":"Sure, here you go :) \r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"src/manage_local.py\", line 10, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/django/core/management/__init__.py\", line 385, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/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 \"/Users/mbykovski/Documents/workspace/connect/virtualenv/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 \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/django/db/transaction.py\", line 394, in inner\r\n    return func(*args, **kwargs)\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/management/commands/buildwatson.py\", line 122, in handle\r\n    refreshed_model_count += rebuild_index_for_model(model, engine_slug, verbosity)\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/management/commands/buildwatson.py\", line 54, in rebuild_index_for_model\r\n    _bulk_save_search_entries(iter_search_entries())\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/registration.py\", line 175, in _bulk_save_search_entries\r\n    search_entry_batch = list(islice(search_entries, 0, batch_size))\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/management/commands/buildwatson.py\", line 39, in iter_search_entries\r\n    for search_entry in search_engine_._update_obj_index_iter(obj):\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/registration.py\", line 444, in _update_obj_index_iter\r\n    \"content\": adapter.get_content(obj),\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/registration.py\", line 129, in get_content\r\n    for field_name in field_names\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/registration.py\", line 129, in <genexpr>\r\n    for field_name in field_names\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/registration.py\", line 78, in _resolve_field\r\n    return self._resolve_field(value, name_parts[1])\r\n  File \"/Users/mbykovski/Documents/workspace/connect/virtualenv/lib/python2.7/site-packages/watson/registration.py\", line 72, in _resolve_field\r\n    search_adapter = self,\r\nwatson.registration.SearchAdapterError: Could not find a property called u'pj_customer' on either <PjInvoice: 8914> or <watson.registration.CustomSearchAdapter object at 0x112170f10>\r\n\r\n```"}}