Commit 6617a953 authored by Yusei Tahara's avatar Yusei Tahara

NotFound exception can be used for http 404 error. Use ValueError instead.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31134 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 98071d32
......@@ -40,7 +40,6 @@ from Products.ERP5.Document.ImmobilisationDelivery import ImmobilisationDelivery
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from zLOG import LOG, PROBLEM
from zExceptions import NotFound
class Delivery(XMLObject, ImmobilisationDelivery):
"""
......@@ -695,7 +694,7 @@ class Delivery(XMLObject, ImmobilisationDelivery):
if len(res) > 0:
rule_id = res[0].getId()
else:
raise NotFound('No such rule as %r is found' % (rule_reference,))
raise ValueError, 'No such rule as %r is found' % rule_reference
self._createAppliedRule(rule_id, force=force, **kw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment