From 6377c12650d678643fb68c7ca4067864b1028575 Mon Sep 17 00:00:00 2001 From: Daniel Fortunov Date: Mon, 3 Feb 2020 14:51:58 +0000 Subject: [PATCH] Define __hash__ for Responders model ...so it can be used in hashable collection. (This is a temporary patch to work around issue opsgenie#38) --- opsgenie_sdk/models/responder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opsgenie_sdk/models/responder.py b/opsgenie_sdk/models/responder.py index 834b623..4e2363d 100644 --- a/opsgenie_sdk/models/responder.py +++ b/opsgenie_sdk/models/responder.py @@ -145,3 +145,6 @@ def __eq__(self, other): def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other + + def __hash__(self): + return hash(self.__dict__)