Пример #1
0
 def _checkParams(self, params):
     l = locators.CategoryWebLocator(params)
     self._target = l.getObject()
     if self._target == None:
         raise NoReportError(
             _("The specified category with id \"%s\" does not exist or has been deleted"
               ) % params["categId"])
Пример #2
0
 def _checkParams(self, params):
     l = locators.CategoryWebLocator(params)
     self._target = l.getObject()
     if self._target is None:
         raise NotFoundError(_(
             "The category with id '{}' does not exist or has been deleted"
         ).format("<strong>{}</strong>".format(params["categId"])),
                             title=_("Category not found"))
Пример #3
0
    def _checkParams( self, params, mustExist = 1 ):
        if "categId" in params:
            params["categId"] = escape_html(str(params["categId"]))
        l = locators.CategoryWebLocator( params, mustExist )
        self._target = l.getObject()

        # throw an error if the category was not found
        if mustExist and self._target == None:
            raise NoReportError(_("The specified category with id \"%s\" does not exist or has been deleted")%params["categId"])
Пример #4
0
    def _checkParams(self, params, mustExist=1):
        l = locators.CategoryWebLocator(params, mustExist)
        self._target = l.getObject()

        # throw an error if the category was not found
        if mustExist and self._target == None:
            raise MaKaCError("The specified category does not exist")
        if self._target:
            self._getSession().setVar("currentCategoryId",
                                      self._target.getId())
Пример #5
0
    def _checkParams(self, params, mustExist=True):
        if "categId" in params:
            params["categId"] = escape_html(str(params["categId"]))
        l = locators.CategoryWebLocator(params, mustExist)
        self._target = l.getObject()

        # throw an error if the category was not found
        if mustExist and self._target is None:
            raise NotFoundError(_("The category with id '{}' does not exist or has been deleted").format(
                                "<strong>{}</strong>".format(params["categId"])),
                                title=_("Category not found"))
Пример #6
0
 def _checkParams(self, params):
     l = locators.CategoryWebLocator(params)
     self._target = l.getObject()
     self._getSession().setVar("currentCategoryId", self._target.getId())
Пример #7
0
 def _checkParams(self, params):
     l = locators.CategoryWebLocator(params)
     self._target = l.getObject()