From c916801c99f0308ec2c3f490b1d77244213ac56f Mon Sep 17 00:00:00 2001 From: Roland Haroutiounian Date: Fri, 24 Jul 2015 16:53:11 +0200 Subject: [PATCH] [#45] Changed the __hash__ implementation of the EmComponent class --- EditorialModel/components.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EditorialModel/components.py b/EditorialModel/components.py index 9dcfbbc..02adfce 100644 --- a/EditorialModel/components.py +++ b/EditorialModel/components.py @@ -79,7 +79,8 @@ class EmComponent(object): ## @brief Hash function that allows to compare two EmComponent # @return EmComponent+ClassName+uid def __hash__(self): - return "EmComponent"+self.__class__.__name__+str(self.uid) + return hash(str(self.attr_dump)) + # return "EmComponent"+self.__class__.__name__+str(self.uid) ## @brief Test if two EmComponent are "equals" # @return True or False