OK, this was a bug introduced in one of the recent patches. I have
fixed it now. 1.65.5


On Jul 15, 4:50 pm, JohnMc <maruadventu...@gmail.com> wrote:
> I have a query. Here is the setup.
>
> The releveant table struct --
>
> assets.define_table('bonds',
>                 assets.Field('symbl','string'),
>                 assets.Field('basis','boolean'),
>                 assets.Field('basisprice','double'),
>                 assets.Field('basisqty','double'),
>                 assets.Field('action','string'),
>                 assets.Field('qrydate','datetime',default=stamp),
>                 assets.Field('price','double'),
>                 assets.Field('coupon','double'),
>                 assets.Field('maturitydate','string'),
>                 assets.Field('ytm','double'),
>                 assets.Field('curyld','double'),
>                 assets.Field('fitchrat','string'),
>                 assets.Field('curpayfreq','string'),
>                 assets.Field('btype','string'),
>                 assets.Field('callable','string'),
>                 assets.Field('fstcpndt','string'),
>                 assets.Field('company','string')
>                 )
>
> assets.bonds.symbl.requires = IS_NOT_EMPTY(error_message='Must not be
> empty')
> assets.bonds.price.requires = IS_NOT_EMPTY(error_message='Must not be
> empty')
> assets.bonds.action.requires = IS_IN_SET
> (['buy','sell','hold','trade','gift'])
> assets.bonds.btype.requires = IS_IN_SET
> (['Municipal','Corporate','Treasury','Treasury Zero Coupon'])
> assets.bonds.curpayfreq.requires = IS_IN_SET
> (['Monthly','Quarterly','Semi-Annual','Annual','NA'])
> assets.bonds.callable.requires = IS_IN_SET(['No','Yes'])
>
> ---------------------------------------------------------
>
> Now I don't get any errors, code works excreta. However I do notice an
> annoying behavior. So here is the general code flow --
>
> * Controller goes out gets data off the web gathers it and does a row
> insert.
> * Inspecting the table using 'database administration' the insert row
> is complete and correct.
> * Were one to click on the id field in 'database administration' to do
> an update, the dropdown fields default to the first value in the
> IS_IN_SET. So for example had the insert placed 'Semi-Annual' in the
> curpayfreq field when, the update appears the 'Monthly' value is
> defaulted. Those values end up in the row update.
>
> That would at best be an error prone behavior at a minimum. Should not
> the drop down value be defaulted to the values reflected in the data
> row the update issued from?
>
> I am running Web2Py 1.65.4
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to