コード例 #1
0
def handle_iterate_wc_deletion(object, event):
    """ When a WorkingCopy is deleted, the problem was that the locking was not
    removed. We're manually triggering the IWorkingCopyDeletedEvent because
    the plone.app.iterate handler is registered for IWorkingCopyRelation, a
    derivate of Archetype's relations, which is not used in the dexterity
    implementation.
    """
    try:
        baseline = get_baseline(object)
    except:
        return
    notify(WorkingCopyDeletedEvent(object, baseline, relation=None))
コード例 #2
0
ファイル: events.py プロジェクト: eea/eea.climateadapt.plone
def handle_iterate_wc_deletion(object, event):
    """ When a WorkingCopy is deleted, the problem was that the locking was not
    removed. We're manually triggering the IWorkingCopyDeletedEvent because
    the plone.app.iterate handler is registered for IWorkingCopyRelation, a
    derivate of Archetype's relations, which is not used in the dexterity
    implementation.
    """
    try:
        baseline = get_baseline(object)
    except:
        return
    notify(WorkingCopyDeletedEvent(object, baseline, relation=None) )
コード例 #3
0
 def getBaseline(self):
     return get_baseline(self.context)
コード例 #4
0
 def _getBaseline(self):
     baseline = get_baseline(self.context)
     if not baseline:
         raise iterate.interfaces.CheckinException(
             "Baseline has disappeared")
     return baseline
コード例 #5
0
 def getBaseline(self):
     return get_baseline(self.context)
コード例 #6
0
 def _getBaseline(self):
     baseline = get_baseline(self.context)
     if not baseline:
         raise iterate.interfaces.CheckinException("Baseline has disappeared")
     return baseline
コード例 #7
0
ファイル: policy.py プロジェクト: vedantc98/Plone-test
 def _getBaseline(self):
     baseline = get_baseline(self.context)
     if not baseline:
         raise CheckinException('Baseline has disappeared')
     return baseline
コード例 #8
0
ファイル: policy.py プロジェクト: plone/plone.app.iterate
 def _getBaseline(self):
     baseline = get_baseline(self.context)
     if not baseline:
         raise CheckinException('Baseline has disappeared')
     return baseline