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"])
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"))
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"])
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())
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"))
def _checkParams(self, params): l = locators.CategoryWebLocator(params) self._target = l.getObject() self._getSession().setVar("currentCategoryId", self._target.getId())
def _checkParams(self, params): l = locators.CategoryWebLocator(params) self._target = l.getObject()