diff options
author | Benjamin Saller <bcsaller@objectrealms.net> | 2007-07-16 14:46:31 (GMT) |
---|---|---|
committer | Benjamin Saller <bcsaller@objectrealms.net> | 2007-07-16 14:46:31 (GMT) |
commit | 22b729df446bbba47801c30fd2fda7a26f9264b0 (patch) | |
tree | 794db17c9479b20e4f0df7a9227a998b51fe4bc0 /src | |
parent | 6df3576dcc93acafbb4d8d22dcd4ab284b64e412 (diff) |
better int property handling
Diffstat (limited to 'src')
-rw-r--r-- | src/olpc/datastore/model.py | 3 | ||||
-rw-r--r-- | src/olpc/datastore/xapianindex.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/olpc/datastore/model.py b/src/olpc/datastore/model.py index e3f9668..ccbf396 100644 --- a/src/olpc/datastore/model.py +++ b/src/olpc/datastore/model.py @@ -301,7 +301,8 @@ registerPropertyType('binary', noop, noop, None, {'store' : True, registerPropertyType('int', str, int, 'float', {'store' : True, 'exact' : True, - 'sortable' : True}) + 'sortable' : True}, + for_xapian=str) registerPropertyType('number', str, float, 'float', {'store' : True, 'exact' : True, diff --git a/src/olpc/datastore/xapianindex.py b/src/olpc/datastore/xapianindex.py index 1b27d79..c465b41 100644 --- a/src/olpc/datastore/xapianindex.py +++ b/src/olpc/datastore/xapianindex.py @@ -256,7 +256,7 @@ class IndexManager(object): uid = create_uid() operation = CREATE - if vid: vid = str(float(vid.value) + 1.0) + if vid: vid = str(float(vid) + 1.0) else: vid = "1.0" # Property mapping via model |