mozilla / elasticutils

[deprecated] A friendly chainable ElasticSearch interface for python
http://elasticutils.rtfd.org
BSD 3-Clause "New" or "Revised" License
243 stars 76 forks source link

The name of the primary key is hardcoded #265

Open geweb7 opened 9 years ago

geweb7 commented 9 years ago

My model has another primary key name, not id. That's why I get the error django.core.exceptions.FieldError: Cannot resolve keyword 'id' into field.

The name of primary key is hard coded in tasks.py: for obj in model.objects.filter(id__in=id_list):

willkg commented 9 years ago

This is addressed in pull #258.

geweb7 commented 9 years ago

Besides I can't indicate database to use. The code here should respect settings in Mapping object.

willkg commented 9 years ago

That sounds like it should be a separate issue. Pull requests are welcome! It's probably not something I'm going to get to.