-
Let's say Comment has a property in the model of story: Link[Story], and we've got a new story instance called newstory. This works: And similarly, it works with arrays of links. But Pylance doesn't like this. It will report that "Story" is incompatible with "Link[Story]" with type checking enabled. I assume this is so basic there's probably some other way to do this like calling a linker like story=link(newstory)? Or some other work around. There's no way to Sorry if the OCD question :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So, the way to fix this:
Now one can assign a linked field in a model instance directly to this link and get no type errors. |
Beta Was this translation helpful? Give feedback.
So, the way to fix this:
Now one can assign a linked field in a model instance directly to this link and get no type errors.