[GeneralDiscussion] applied to stable: be more careful when mutating the parents property, to avoid inconsistencies (#1353, Willi Langenberger)
[email protected] (stable-repo)
| Newsgroups | gmane.comp.web.zope.zwiki |
|---|---|
| Message-ID | <20080502040232.1FFAD465DCD__13729.2443695062$1209701025$gmane$org@mail.joyful.com> |
Thu May 1 21:00:59 PDT 2008 [email protected] * be more careful when mutating the parents property, to avoid inconsistencies (#1353, Willi Langenberger) diff -rN -u old-ZWiki/OutlineSupport.py new-ZWiki/OutlineSupport.py --- old-ZWiki/OutlineSupport.py 2008-05-01 21:02:31.000000000 -0700 +++ new-ZWiki/OutlineSupport.py 2008-05-01 21:02:31.000000000 -0700 @@ -156,10 +156,13 @@ if parent and not parent in self.parents: self.ensureParentsPropertyIsList() self.parents.append(parent) + self._p_changed = 1 def removeParent(self,parent): self.ensureParentsPropertyIsList() - try: self.parents.remove(parent) + try: + self.parents.remove(parent) + self._p_changed = 1 except ValueError: BLATHER("failed to remove %s from %s's parents (%s)" \ % (parent,self.getId(),self.parents)) -- forwarded from http://zwiki.org/GeneralDiscussion#[email protected]