Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#13934 closed (fixed)

GeoSQLCompiler.get_default_columns() is missing local_only parameter

Reported by: sfllaw Owned by: jbronn
Component: GIS Version: 1.2
Severity: Keywords: select_related local_only get_default_columns GeoDjango GeoSQLCompiler
Cc: simon@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by jbronn)

If you try to select_related() with a GeoManager, things get pretty nasty with Django 1.2.

You get a TypeError, claiming that get_default_columns() does not support the local_only parameter.

Included is a patch that ports the functionality over.

Attachments (2)

gis-local_only.patch (1.4 KB) - added by sfllaw 4 years ago.
testapp.tar.gz (770 bytes) - added by sfllaw 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by sfllaw

comment:1 Changed 4 years ago by jbronn

  • milestone set to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to jbronn
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 4 years ago by jbronn

  • Description modified (diff)

Obviously, the code needs to be synced up. However, the existing tests for select_related aren't blowing up -- can you provide a simple example that raises the TypeError? I want to explicitly test for the condition that induces the failure to ensure it doesn't regress.

comment:3 Changed 4 years ago by sfllaw

Attached is a test app (with a test case) that breaks without my patch.

I'm not sure how to add this to django.contrib.gis, but I hope it helps.

Changed 4 years ago by sfllaw

comment:4 Changed 4 years ago by jbronn

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

(In [13439]) Fixed #13934 -- GeoSQLCompiler.get_default_columns was missing local_only keyword argument. Thanks, Simon Law, for bug report and initial patch.

comment:5 Changed 4 years ago by jbronn

(In [13440]) [1.2.X] Fixed #13934 -- GeoSQLCompiler.get_default_columns was missing local_only keyword argument. Thanks, Simon Law, for bug report and initial patch.

Backport of r13439 from trunk.

comment:6 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 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.