changeset 2245:555d74396ece

cleanup (added a missing key TRASH in fields, ensure namespace key to be in meta.)
author Ashutosh Singla <ashu1461@gmail.com>
date Sun, 18 Aug 2013 16:17:58 +0530
parents ec92e2ded24d
children f6fa7658535e
files MoinMoin/items/__init__.py MoinMoin/storage/middleware/indexing.py
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Sun Aug 18 15:22:52 2013 +0530
+++ b/MoinMoin/items/__init__.py	Sun Aug 18 16:17:58 2013 +0530
@@ -537,6 +537,11 @@
                     if not delete:
                         oldname.append(name)
                     meta[NAME] = oldname
+            elif not meta.get(ITEMID):
+                meta[NAME] = [name]
+
+        if not meta.get(NAMESPACE):
+            meta[NAMESPACE] = self.fqname.namespace
 
         if comment is not None:
             meta[COMMENT] = unicode(comment)
--- a/MoinMoin/storage/middleware/indexing.py	Sun Aug 18 15:22:52 2013 +0530
+++ b/MoinMoin/storage/middleware/indexing.py	Sun Aug 18 16:17:58 2013 +0530
@@ -302,6 +302,8 @@
             SUMMARY: TEXT(stored=True),
             # DATAID from metadata
             DATAID: ID(stored=True),
+            # TRASH from metadata
+            TRASH: BOOLEAN(stored=True),
             # data (content), converted to text/plain and tokenized
             CONTENT: TEXT(stored=True),
         }