fix bug in ParentRelation: __eq__() method is not called for '!='...

This commit is contained in:
Helmut Merz 2012-02-29 19:42:08 +01:00
parent 17de8893ae
commit 91cdcc2c06

View file

@ -479,8 +479,9 @@ class ParentRelation(object):
return None return None
def __set__(self, inst, value): def __set__(self, inst, value):
value = baseObject(value)
rs = ParentRelationSet(inst, self.predicateName) rs = ParentRelationSet(inst, self.predicateName)
rsList = list(rs) rsList = [baseObject(p) for p in rs]
for current in rsList: for current in rsList:
if current != value: if current != value:
rs.remove(current) rs.remove(current)