Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Justin Bronn authored December 29, 2009

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/contrib/gis/db/models/manager.py
5  django/contrib/gis/db/models/manager.py
@@ -10,7 +10,10 @@ class GeoManager(Manager):
10 10
     use_for_related_fields = True
11 11
 
12 12
     def get_query_set(self):
13  
-        return GeoQuerySet(model=self.model)
  13
+        qs = GeoQuerySet(self.model)
  14
+        if self._db is not None:
  15
+            qs = qs.using(self._db)
  16
+        return qs
14 17
 
15 18
     def area(self, *args, **kwargs):
16 19
         return self.get_query_set().area(*args, **kwargs)

0 notes on commit 4ab21fb

Please sign in to comment.
Something went wrong with that request. Please try again.