Here is the current definition of the relevant table:

#current annual rates based on latest record:

db.define_table('Duesrates',
Field('Date', 'date', default=request.now.date(), writable=False),
Field('Full', 'decimal(5,2)'),
Field('Student', 'decimal(5,2)'))

However, when this table was first added, it would have been:

#current annual rates based on latest record
db.define_table('Duesrates',
Field('Date', 'date', default=request.now.date(), writable=False),
Field('Full', 'integer'),
Field('Student', 'integer'))

The records in the GAE datastore viewer are:

Duesrates Entities   Delete
Name/IDDateFullStudentid=17364 
<https://console.developers.google.com/project/ocsnedb-hrd/datastore/editentity/?key=0%2F%7C9%2FDuesrates%7C8%2Fid%3A17364&namespace&kind=Duesrates>2000-09-29
 
20:00:00205id=5728242778505216 
<https://console.developers.google.com/project/ocsnedb-hrd/datastore/editentity/?key=0%2F%7C9%2FDuesrates%7C19%2Fid%3A5728242778505216&namespace&kind=Duesrates>2015-07-09
 
20:00:003010
But the individual entities are:

Ancestor Path: Duesrates id:17364 
<https://console.developers.google.com/project/ocsnedb-hrd/datastore/editentity/?key=0%2F%7C9%2FDuesrates%7C8%2Fid%3A17364&namespace=true&kind=Duesrates>
Properties
An integer
Indexed
A date and time
Indexed
An integer
Indexed
 Add item
Save Entity


Edit Entity

Namespace: Default Namespace

Ancestor Path: Duesrates id:5728242778505216 
<https://console.developers.google.com/project/ocsnedb-hrd/datastore/editentity/?key=0%2F%7C9%2FDuesrates%7C19%2Fid%3A5728242778505216&namespace=true&kind=Duesrates>
Properties
A string
Indexed
A date and time
Indexed
A string
Indexed
 Add item
Save Entity


When the first record was stored, the field was integer. When I later added 
an accounting mechanism, the field was redefined as decimal. Later the 
second record was added.


The version built with web2py 2.9.12 reads both entities correctly:

2 selected 
Duesrates.id 
<https://ocsnedb.appspot.com/init/appadmin/select/db?orderby=Duesrates.id>
Duesrates.Date 
<https://ocsnedb.appspot.com/init/appadmin/select/db?orderby=Duesrates.Date>
Duesrates.Full 
<https://ocsnedb.appspot.com/init/appadmin/select/db?orderby=Duesrates.Full>
Duesrates.Student 
<https://ocsnedb.appspot.com/init/appadmin/select/db?orderby=Duesrates.Student>
17364 <https://ocsnedb.appspot.com/init/appadmin/update/db/Duesrates/17364>
2000-09-3020.005.005728242778505216 
<https://ocsnedb.appspot.com/init/appadmin/update/db/Duesrates/5728242778505216>
2015-07-1030.0010.00

However the version built with web2py 2.12.3 shows:

Duesrates.id 
<https://ocsnedb.appspot.com/init/appadmin/select/db?orderby=Duesrates.id>
Duesrates.Date 
<https://ocsnedb.appspot.com/init/appadmin/select/db?orderby=Duesrates.Date>
Duesrates.Full 
<https://ocsnedb.appspot.com/init/appadmin/select/db?orderby=Duesrates.Full>
Duesrates.Student 
<https://ocsnedb.appspot.com/init/appadmin/select/db?orderby=Duesrates.Student>
17364 <https://ocsnedb.appspot.com/init/appadmin/update/db/Duesrates/17364>
2000-09-30NoneNone5728242778505216 
<https://ocsnedb.appspot.com/init/appadmin/update/db/Duesrates/5728242778505216>
2015-07-1030.0010.00 

i.e. it converts the integer field value to None.

-- 
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