diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-12-13 18:31:36 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-12-13 18:31:36 (GMT) |
commit | 449f94112e11ddf5a4198bab796a9ef9d7f37236 (patch) | |
tree | a55a33e4e71749d0bdebf481f3d10c4701e8022f | |
parent | d79514f49bdcaf162147eee4252e006d21e5af7b (diff) |
Revert "#4662 Correctly fix properties not in the model."
This reverts commit 597cb100bcaccc37c1614b5cfb013da2c43d541d.
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/olpc/datastore/model.py | 1 | ||||
-rw-r--r-- | src/olpc/datastore/xapianindex.py | 7 |
3 files changed, 1 insertions, 9 deletions
@@ -1,5 +1,3 @@ -* #4662 Correctly fix properties not in the model. (tomeu) - Snapshot ea0764a9e9 * #4662 Add the 'source' property to the model. (marco) diff --git a/src/olpc/datastore/model.py b/src/olpc/datastore/model.py index cdaee9f..acabae3 100644 --- a/src/olpc/datastore/model.py +++ b/src/olpc/datastore/model.py @@ -399,5 +399,6 @@ defaultModel = Model().addFields( ('icon-color', 'string'), ('preview', 'external'), ('buddies', 'text'), + ('source', 'text'), ) diff --git a/src/olpc/datastore/xapianindex.py b/src/olpc/datastore/xapianindex.py index dfef53c..06041aa 100644 --- a/src/olpc/datastore/xapianindex.py +++ b/src/olpc/datastore/xapianindex.py @@ -104,12 +104,6 @@ class IndexManager(object): datamodel = kwargs.get('model', model.defaultModel) datamodel.apply(self) - # configure the model according to the database - for field_name in self.write_index._field_actions: - if field_name not in datamodel.fields: - datamodel.addField(field_name, 'string') - self.fields.add(field_name) - # store a reference self.datamodel = datamodel @@ -314,7 +308,6 @@ class IndexManager(object): d = {} add_anything = False for k,v in props.iteritems(): - k = str(k) p, added = self.datamodel.fromstring(k, v, allowAddition=True) if added is True: |