def get_path_info(self):
to_opts = self.remote_field.model._meta
from_opts = self.model._meta
return [PathInfo(from_opts, to_opts, (to_opts.pk,), self, False, False)]
# It is allowed to filter on values that would be found from local
# model anyways. For example, if you filter on employee__department__id,
# then the id value would be found already from employee__department_id.
I'm not sure in this situation, should we change the target_field so let it only focus on xxx_id instead of pk? Or we just add a condition in option.py to check xxx_id or not?