My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 255: negative quantity is allowed in the "Product Details" portlet
3 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  lucielejard
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by lucielejard, Apr 17, 2009
I've noticed that to put a negative number in the form of footer of
the portlet "Product Details" doesn't give an error and allow to have
a cart with a negative price.

I first supposed that it could be avoided in
constraining  "quantity" to be a non negative number in the ILineItem
interface

but on the other hand when you put a string that can't be converted to
a number, an error is thrown -- ConversionErrror
at
       # check quantity from request
       qty = int(self.request.get('quantity', 1))
of browser/cart.py ---
 error that is not handled despite the fact that quantity is declared
in the interface as a number


Sign in to add a comment

Hosted by Google Code