Fixed `GeoManager.get_query_set` incompatibility with `db_manager` method.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b7cb882471
commit
4ab21fbf40
|
@ -10,7 +10,10 @@ class GeoManager(Manager):
|
|||
use_for_related_fields = True
|
||||
|
||||
def get_query_set(self):
|
||||
return GeoQuerySet(model=self.model)
|
||||
qs = GeoQuerySet(self.model)
|
||||
if self._db is not None:
|
||||
qs = qs.using(self._db)
|
||||
return qs
|
||||
|
||||
def area(self, *args, **kwargs):
|
||||
return self.get_query_set().area(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue