Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix IndexError for custom queryset managers
Sometimes Mypy crashes on this line with an IndexError. This change builds on the change in typeddjango#1786 by making further use of the safer variable `typed_var`. `typed_var` will equal `manager_instance.args` if `manager_instance.args` is populated, but if it isn't it will have another sensible value we can use instead. Because that value should be populated, this prevents the crash.
- Loading branch information