def update(self): if (getattr(self.context, "collective_immediatecreate", None) != "initial" # noqa: W503 ): url = self.context.absolute_url() + "/edit" url = addTokenToUrl(url) raise Redirect(url) self.portal_type = self.context.portal_type if ILocking.providedBy(self.context): lockable = ILockable(self.context) if lockable.locked(): lockable.unlock() super().update() # fire the edit begun only if no action was executed if len(self.actions.executedActions) == 0: notify(EditBegunEvent(self.context))
def test_locking_behavior(self): self.assertTrue(ILocking.providedBy(self.c1))
def test_locking_behavior(self): self.assertTrue(ILocking.providedBy(self.cover))