Skip to content

fix Django Support: "pk" field has wrong type when using ForeignKey(…, primary_key=True) #4995 - #4996

Closed
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4995
Closed

asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4995

Conversation

@asukaminato0721

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4995

Django foreign-key primary keys and dependent _id attributes now infer the underlying key type.

Test Plan

add test

@meta-codesync

meta-codesync Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D121020601. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@rchen152 rchen152 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot closed this in 94ce5f0 Sep 21, 2026
@meta-codesync meta-codesync Bot added the Merged label Sep 21, 2026
@meta-codesync

meta-codesync Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in 94ce5f0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Django Support: "pk" field has wrong type when using ForeignKey(…, primary_key=True)

2 participants