avoid duplicates when adding to a parent relation set
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2977 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
01bd976a19
commit
cc3129dd65
1 changed files with 1 additions and 0 deletions
|
@ -309,6 +309,7 @@ class ParentRelationSet(RelationSet):
|
|||
def add(self, related, order=0, relevance=1.0):
|
||||
if isinstance(related, AdapterBase):
|
||||
related = related.context
|
||||
self.context.deassignParent(related, [self.predicate])
|
||||
self.context.assignParent(related, self.predicate, order, relevance)
|
||||
|
||||
def remove(self, related):
|
||||
|
|
Loading…
Add table
Reference in a new issue