-
-
Notifications
You must be signed in to change notification settings - Fork 508
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
What's wrong
The typing of a ManyToMany relation's add()
method incorrectly assumes that model ids are int, but they can be other types, such as UUID. Attempting to call add(model_id)
causes a mypy error if the id is not an int:
Argument 1 has incompatible type "UUID"; expected "Union[FooModel, int]"
How is that should be
The add()
method should accept the related model, and whatever the type of the related model's id is.
utapyngo, palfrey, superlevure and thacoonthacoon
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working