Fixed PostGIS remove_field implementation

Fixed bad code introduced in 2f9d1576e8.
This commit is contained in:
Claude Paroz 2014-04-21 22:42:11 +02:00
parent 2f9d1576e8
commit 1667e736a7
1 changed files with 8 additions and 8 deletions

View File

@ -92,9 +92,9 @@ class PostGISSchemaEditor(DatabaseSchemaEditor):
def remove_field(self, model, field):
from django.contrib.gis.db.models.fields import GeometryField
if not isinstance(field, GeometryField) or self.connection.ops.spatial_version < (2, 0):
if not isinstance(field, GeometryField) or self.connection.ops.spatial_version > (2, 0):
super(PostGISSchemaEditor, self).remove_field(model, field)
else:
self.execute(
self.sql_drop_geometry_column % {
"table": self.geo_quote_name(model._meta.db_table),