def OnUnPubSub(self, evt): share = sharing.getShare(self.collection) if sharing.isSharedByMe(share): sharing.unpublish(self.collection) else: sharing.unsubscribe(self.collection) if self.IsModal(): self.EndModal(False) self.Destroy()
def OnRemove(self, evt): try: sharing.unpublish(self.collection) except: logger.exception("Failed to unpublish. Continuing...") self.EndModal(True)
def Unpublish(self): view0 = self.views[0] sandbox0 = view0.findPath("//sandbox") coll0 = sandbox0.findPath("testCollection") sharing.unpublish(coll0)