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

Indexing a OneToOne User field only takes its username attribute #213

Closed
neeti25 opened this issue Jul 13, 2017 · 4 comments
Closed

Indexing a OneToOne User field only takes its username attribute #213

neeti25 opened this issue Jul 13, 2017 · 4 comments
Assignees

Comments

@neeti25
Copy link

neeti25 commented Jul 13, 2017

I have made two models Student and Teacher by extending Django's User Model in OneToOne fields student and teacher respectively. When i register my Student and Teacher models to algolia, it only takes the username attribute of User in student(or teacher). I am not able to access other fields of User model like first_name, last_name etc. in algolia. How can i access these fields?

@PLNech
Copy link
Member

PLNech commented Jul 13, 2017

Hi @neeti25, thank you for reporting this! I wonder if it's not the same issue we have with ManyToMany fields in #202.

Let me investigate this, I'll keep you updated here of my progress!

@PLNech PLNech self-assigned this Jul 13, 2017
@PLNech PLNech added the bug label Jul 13, 2017
@PLNech PLNech changed the title Fields of User model cannot be accessed! Indexing a OneToOne User field only takes its username attribute Jul 13, 2017
@neeti25
Copy link
Author

neeti25 commented Jul 14, 2017

Sure.

@PLNech
Copy link
Member

PLNech commented Aug 22, 2017

@neeti25: We just documented a way to index ManyToMany fields in 0f70028, can you check the documented approach and let me know if it works for your usecase? 🙂

@PLNech
Copy link
Member

PLNech commented Jan 9, 2018

Closing as 0f70028 introduces a solution and @neeti25 didn't answer the previous comment, suggesting the issue is resolved.

@PLNech PLNech closed this as completed Jan 9, 2018
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

2 participants