-
-
Notifications
You must be signed in to change notification settings - Fork 22
many_to_one/related field name #121
-
I have a model Compiled with a foreign key to Module, declared as follows:
parent = models.ForeignKey(Module, ..., related_name="compiled")
With use_query, this fails because it attempts to fetch compiled_set, I believe, due to this line in utils:
prefetch_fields.append(f"{field.name}_set")
Maybe it should be
prefetch_fields.append(field.related_name or f"{field.name}_set")
?
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
Archmonger
Jan 13, 2023
Thanks. I've created a new issue for this and will fix shortly.
Replies: 2 comments 1 reply
-
Thanks. I've created a new issue for this and will fix shortly.
Beta Was this translation helpful? Give feedback.
All reactions
1 reply
-
This has been merged into main. Will be released with version 3.0.0 this weekend.
Beta Was this translation helpful? Give feedback.
All reactions
Answer selected by
numpde
-
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment