[Fixed]-How can i use a lookup table to get a row from a parent table using parameter in django

1πŸ‘

βœ…

I don’t understand what my_service is supposed to do, or why it returns a list. Also, it’s an instance method on ServiceUser, but you seem to be calling it as a classmethod.

If you want to go from user to service, you can just follow the relationships: user.user_service.service. You can do that directly in your view; there is no need for that method at all.

Leave a comment