예제 #1
0
 def _process(self):
     if self._action == "MARK":
         if self._original is None or self._target == self._original:
             raise MaKaCError(_("invalid original abstract id"))
         self._abstract.markAsDuplicated(
             self._getUser(), self._original, self._comments, self._track)
         self._redirect(urlHandlers.UHTrackAbstractModif.getURL(
             self._track, self._abstract))
         return
     p = tracks.WPModAbstractMarkAsDup(self, self._track, self._abstract)
     return p.display(comments=self._comments, originalId=self._originalId)
예제 #2
0
 def _process(self):
     errMsg = ""
     if self._action == "MARK":
         errorList = self._getErrorsInData()
         if len(errorList) == 0:
             self._abstract.markAsDuplicated(self._getUser(),
                                             self._original, self._comments,
                                             self._track)
             self._redirect(
                 urlHandlers.UHTrackAbstractModif.getURL(
                     self._track, self._abstract))
             return
         else:
             errMsg = "<br>".join(errorList)
     p = tracks.WPModAbstractMarkAsDup(self, self._track, self._abstract)
     return p.display(comments=self._comments,
                      originalId=self._originalId,
                      errorMsg=errMsg)