why during store boolean data type in session, always return true during 
insert?
e.g. problem
for counter, (id, quantity, length_in_cm, width_in_cm, total_square_meter, 
*bevel, 
gosok_halus*) in session.delivery_order_detail.items():
db.delivery_order_detail.insert(delivery_order_no = delivery_order_id, 
product = id, 
quantity = quantity, 
length_in_cm = length_in_cm, 
width_in_cm = width_in_cm, 
total_square_meter = total_square_meter, 
*bevel = bevel,*
* gosok_halus = gosok_halus)*
e.g. solve
for counter, (id, quantity, length_in_cm, width_in_cm, total_square_meter, 
*bevel, 
gosok_halus*) in session.delivery_order_detail.items():
if bevel == 'None' and gosok_halus == 'None':
db.delivery_order_detail.insert(delivery_order_no = delivery_order_id, 
product = id, 
quantity = quantity, 
length_in_cm = length_in_cm, 
width_in_cm = width_in_cm, 
total_square_meter = total_square_meter, 
bevel = False,
gosok_halus = False)
elif bevel == 'on' and gosok_halus == 'None':
db.delivery_order_detail.insert(delivery_order_no = delivery_order_id, 
product = id, 
quantity = quantity, 
length_in_cm = length_in_cm, 
width_in_cm = width_in_cm, 
total_square_meter = total_square_meter, 
bevel = True,
gosok_halus = False)
elif bevel == 'None' and gosok_halus == 'on':
db.delivery_order_detail.insert(delivery_order_no = delivery_order_id, 
product = id, 
quantity = quantity, 
length_in_cm = length_in_cm, 
width_in_cm = width_in_cm, 
total_square_meter = total_square_meter, 
bevel = False,
gosok_halus = True)
elif bevel == 'on' and gosok_halus == 'on':
db.delivery_order_detail.insert(delivery_order_no = delivery_order_id, 
product = id, 
quantity = quantity, 
length_in_cm = length_in_cm, 
width_in_cm = width_in_cm, 
total_square_meter = total_square_meter, 
bevel = True,
gosok_halus = True)

i must manually explicit using if condition about the boolean value (*bevel, 
gosok_halus*), is it normal, or is there any better way rather than this 
one?
thanks and best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to