Opened 2 years ago

Closed 2 years ago

#20758 closed Bug (invalid)

PostGISCreation failed by index creation for PointField

Reported by: jarus Owned by: nobody
Component: Database layer (models, ORM) Version: 1.5
Severity: Normal Keywords: GeoDjango, Index, Test
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I want to test my GeoDjango project but the index creation a PointField fails.

   db_type = f.db_type(connection=self.connection)
>  if db_type.startswith('varchar'):
E  AttributeError: 'NoneType' object has no attribute 'startswith'

The PointField returns only None in this state. The if statements are only relevant for VARCHAR or TEXT fields but not for Geo Fields.

Change History (1)

comment:1 Changed 2 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Indexes for geometry fields should be specified with spatial_index (which defaults to True anyway), not db_index:

Note: See TracTickets for help on using tickets.
Back to Top