﻿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
29054	Unhashable type Point bug with multiple annotations	Lachlan Cannon	nobody	"Simplified example to reproduce, with these models:

{{{#!python
class State(models.Model):
    name = models.CharField(max_length=100)

class Locality(models.Model):
    name = models.CharField(max_length=100)
    location = models.PointField(geography=True)
    state = models.ForeignKey(State, on_delete=models.CASCADE)
}}}

Running the following code works fine in 2.0 (assuming you have a few models set up):

{{{#!python
State.objects.annotate(distance=Distance('locality__location', Locality.objects.first().location))
}}}

But this code works in 1.11, and fails in 2.0.1 with TypeError: unhashable type: 'Point':

{{{#!python
State.objects.annotate(distance=Distance('locality__location', self.locality.location)).annotate(count=Count('locality'))
}}}"	Uncategorized	new	GIS	2.0	Normal				Unreviewed	0	0	0	0	0	0
