Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

The name of the primary key is hardcoded #265

Open
geweb7 opened this issue Sep 23, 2014 · 3 comments
Open

The name of the primary key is hardcoded #265

geweb7 opened this issue Sep 23, 2014 · 3 comments

Comments

@geweb7
Copy link

geweb7 commented Sep 23, 2014

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
Copy link
Member

willkg commented Sep 23, 2014

This is addressed in pull #258.

@geweb7
Copy link
Author

geweb7 commented Sep 23, 2014

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

@willkg
Copy link
Member

willkg commented Sep 23, 2014

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

toopy pushed a commit to peopledoc/elasticutils that referenced this issue Nov 4, 2014
toopy pushed a commit to peopledoc/elasticutils that referenced this issue Nov 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants