﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27314	PointField can't be used in get_or_create	kemar	nobody	"- Django **1.10.2**
- PostgreSQL **9.4.9**
- PostGIS **2.2.2**

With this model:

{{{
from django.contrib.gis.db import models as gis_models
from django.db import models as django_models

class MyModel(django_models.Model):
    coords = gis_models.PointField(geography=True)
}}}

Try this:

{{{
>>> i = MyModel.objects.all()[0]
>>> type(i.coords)
>>> django.contrib.gis.geos.point.Point
>>> MyModel.objects.get_or_create(coords=i.coords)

ValueError: PostGIS geography does not support the ""~="" function/operator.
}}}

But [https://www.postgresql.org/docs/9.4/static/functions-geometry.html#FUNCTIONS-GEOMETRY-OP-TABLE/ `~=` is a valid operator].

Looks like a bug to me."	Bug	closed	GIS	1.10	Normal	invalid			Unreviewed	0	0	0	0	0	0
