1
0
mirror of https://github.com/django/django.git synced 2025-01-27 02:29:55 +00:00

Modified GeoManager.get_query_set to reflect changes made for database routing in r12272.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Justin Bronn 2010-01-22 18:30:23 +00:00
parent f114fbecc2
commit 5ec44450df

View File

@ -10,10 +10,7 @@ class GeoManager(Manager):
use_for_related_fields = True
def get_query_set(self):
qs = GeoQuerySet(self.model)
if self._db is not None:
qs = qs.using(self._db)
return qs
return GeoQuerySet(self.model, using=self._db)
def area(self, *args, **kwargs):
return self.get_query_set().area(*args, **kwargs)