Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed `GeoManager.get_query_set` incompatibility with `db_manager` me…

…thod.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4ab21fbf40f456fc3126e935505af47366c64372 1 parent b7cb882
@jbronn jbronn authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/contrib/gis/db/models/manager.py
View
5 django/contrib/gis/db/models/manager.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.