From c2d3195142e1fe031eca78da1ca87b2680c28276 Mon Sep 17 00:00:00 2001 From: arushi201296 Date: Wed, 14 Jul 2021 13:37:25 +0530 Subject: [PATCH] fix: Issue-391. Modify __hash__ method of DocumentSnapshot. Follow proper commit message conventions. Sign CLA. --- google/cloud/firestore_v1/base_document.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/cloud/firestore_v1/base_document.py b/google/cloud/firestore_v1/base_document.py index 32694ac472..1a3a194654 100644 --- a/google/cloud/firestore_v1/base_document.py +++ b/google/cloud/firestore_v1/base_document.py @@ -368,8 +368,8 @@ def __eq__(self, other): return self._reference == other._reference and self._data == other._data def __hash__(self): - seconds = int(self.update_time.timestamp()) - nanos = self.update_time.nanosecond + seconds = int(self.update_time.seconds) + nanos = self.update_time.nanos return hash(self._reference) + hash(seconds) + hash(nanos) @property