Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#12706 closed (fixed)

GeoQuerySet.__init__ doesn't make use of "using" kwarg

Reported by: albsen Owned by: nobody
Component: GIS Version: 1.2-alpha
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

Description

Hi,
just a really small thing:

The init method doesn't send using to the parent QuerySet.init method.

Here is the patch

diff --git a/django/contrib/gis/db/models/query.py b/django/contrib/gis/db/models/query.py
index 8f25c13..63100ec 100644
--- a/django/contrib/gis/db/models/query.py
+++ b/django/contrib/gis/db/models/query.py
@@ -12,7 +12,7 @@ class GeoQuerySet(QuerySet):
 
     ### Methods overloaded from QuerySet ###
     def __init__(self, model=None, query=None, using=None):
-        super(GeoQuerySet, self).__init__(model=model, query=query)
+        super(GeoQuerySet, self).__init__(model=model, query=query, using=using)
         self.query = query or GeoQuery(self.model)
 
     def values(self, *fields):

sorry, it's just to small for its own file. :D

cheers,

ASD

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by jbronn

  • Resolution set to fixed
  • Status changed from new to closed

(In [12309]) Fixed #12706 -- Forgot to pass using kwarg in parent class initialization of GeoQuerySet. Thanks, albsen.

comment:2 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.