Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enricher doesn't work on models with inheritance? #97

Open
lggwettmann opened this issue Apr 6, 2020 · 0 comments
Open

Enricher doesn't work on models with inheritance? #97

lggwettmann opened this issue Apr 6, 2020 · 0 comments

Comments

@lggwettmann
Copy link

Hey guys,

Some of the fields in my feeds don't get enriched if the target field points to a class that has been inherited. For models with inheritance, the PK is a one-to-one field. I don't know why but this line in enrich.Enricher._inject_objects() doesn't return an integer for the PK. Instead, the f_id stays a string which of course makes finding it impossible later on.

 f_id = model._meta.pk.to_python(f_id) 

I found that a simple cast to an integer works:

f_id = int(model._meta.pk.to_python(f_id))

Is this a bug? Could you check that and if possible push it? Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant