1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00

Removed SRID use in PostGISAdapter.__eq__() and __hash__().

EWKB already contains the SRID.
This commit is contained in:
Sergey Fedoseev 2017-07-19 19:04:15 +05:00 committed by Tim Graham
parent e06cab2600
commit 196da41ee2

View File

@ -36,10 +36,10 @@ class PostGISAdapter:
def __eq__(self, other):
if not isinstance(other, PostGISAdapter):
return False
return (self.ewkb == other.ewkb) and (self.srid == other.srid)
return self.ewkb == other.ewkb
def __hash__(self):
return hash((self.ewkb, self.srid))
return hash(self.ewkb)
def __str__(self):
return self.getquoted()