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:
Justin Bronn 2009-12-29 09:57:37 +00:00
parent b7cb882471
commit 4ab21fbf40
1 changed files with 4 additions and 1 deletions

View File

@ -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)