Fix: Added try/catch to product delete as it would bork at times deleting products where narration would exceed the field length

This commit is contained in:
Amritanshu 2013-11-20 18:44:11 +05:30
parent 536bf27403
commit 1498e46302

@ -56,6 +56,7 @@ def update(request):
@view_config(request_method='DELETE', route_name='api_product_id', renderer='json', permission='Products')
@TryCatchFunction
def delete(request):
product = Product.by_id(uuid.UUID(request.matchdict['id']))
can_delete, reason = product.can_delete('Advanced Delete' in groupfinder(authenticated_userid(request), request))