modify RowEvent hash key
conditions can not be as the hash key, some columns type are list or dict which can't be hash Change-Id: Ib9cdf6ab6cabd60b3d42bd4acde6daae0831b96c
This commit is contained in:
parent
bc06517ba3
commit
5e141174f1
|
@ -38,14 +38,15 @@ class RowEvent(object):
|
|||
|
||||
@property
|
||||
def key(self):
|
||||
return (self.__class__, self.table, self.events, self.conditions)
|
||||
return (self.__class__, self.table, tuple(self.events))
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.key)
|
||||
|
||||
def __eq__(self, other):
|
||||
try:
|
||||
return self.key == other.key
|
||||
return (self.key == other.key and
|
||||
self.conditions == other.conditions)
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue