You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been enjoying using get_object_or_None all over my project in place of lazy incorrect .first() calls, and it's really great. However, it has the downside of losing the information about the object's type. Pyright tells me the returned type is Unknown | None, even though I know it has to be the corresponding type of the Model | QuerySet | BaseManager that I passed as klass.
The text was updated successfully, but these errors were encountered:
I have been enjoying using
get_object_or_None
all over my project in place of lazy incorrect.first()
calls, and it's really great. However, it has the downside of losing the information about the object's type. Pyright tells me the returned type isUnknown | None
, even though I know it has to be the corresponding type of theModel | QuerySet | BaseManager
that I passed asklass
.The text was updated successfully, but these errors were encountered: