Closed pljspahn closed 4 years ago
=/
It never fails that after I post an issue or question, I find out the problem immediately after.
watson.register(PlantProduct, fields=("genus__latin"))
was missing the trailing comma
watson.register(PlantProduct, fields=("genus__latin",))
Fixed it.
Yup, that's the way it always goes!
Thanks for posting the solution. Means the next person with the problem might avoid the next pitfall, and keeps the open issue list small.
I have the following models:
I have registered
PlantProduct
with watson without any additional options:I am able to search and it's fine. I would like to add the
genus
foreign key to the search, specifically the latin name, so I changed the model registration to:After making this change, I now run
manage.py buildwatson
which fails with the error:watson.search.SearchAdapterError: Could not find a property called 'g' on either <PlantProduct: Mission Arborvitae> or <watson.search.CustomSearchAdapter object at 0x7f7ea2ceb610>
I am using Django 3.0.5 with PostgreSQL - Am I trying to do something that's not supported?