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.
π€Daniel Roseman
Source:stackexchange.com