Skip to content

Refactor clone_field method implementation#60

Open
Izcarmt95 wants to merge 2 commits into
eadwinCode:masterfrom
open-byte:fix/bad-copy-of-annotation
Open

Refactor clone_field method implementation#60
Izcarmt95 wants to merge 2 commits into
eadwinCode:masterfrom
open-byte:fix/bad-copy-of-annotation

Conversation

@Izcarmt95

Copy link
Copy Markdown

Refactor the clone_field method to use _copy and explicitly set attributes.

The previous implementation generated an incorrect annotation (annotation=PlainRepr instead of annotation=NoneType). This resulted in an invalid JSON schema and incorrect foreign key (FK) validation.

This occured when you put an FK as optional field

you can see this test in category attribute:

image image

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant