﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24911	QuerySet is initiated with model=None as kwarg, but is called in BaseManager.get_queryset() as arg.	Jonas Degrave	Jonas Degrave	"QuerySet is initiated with {{{model=None}}} as named argument a.k.a. kwarg:
{{{
class QuerySet(object):
     def __init__(self, model=None, query=None, using=None, hints=None):
}}}
But it is called in {{{get_queryset()}}} as positional argument a.k.a. arg:
{{{
def get_queryset(self):
        return self._queryset_class(self.model, using=self._db, hints=self._hints)
}}}
This causes trouble when overriding {{{get_queryset}}} (which is the idea behind the method) and using {{{super(BlaBlaManager, self).get_queryset()}}} which returns a non-standard queryset-class, where model is not necessarily the first argument, which should have been okay as model is a named argument.

Proposed solution:
in db/models/manager.py
{{{
def get_queryset(self):
        return self._queryset_class(model=self.model, using=self._db, hints=self._hints)
}}}

Github pull request: https://github.com/django/django/pull/4745"	Bug	closed	Database layer (models, ORM)	1.8	Normal	fixed			Accepted	1	0	0	0	1	0
