diff roundup/backends/rdbms_common.py @ 2513:7e823f8938e9 maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Thu, 01 Jul 2004 03:58:34 +0000
parents ea887c804103
children 50da6d3bac46
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py	Tue Jun 29 05:53:37 2004 +0000
+++ b/roundup/backends/rdbms_common.py	Thu Jul 01 03:58:34 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: rdbms_common.py,v 1.98.2.13 2004-06-29 05:53:37 richard Exp $
+# $Id: rdbms_common.py,v 1.98.2.14 2004-07-01 03:58:34 richard Exp $
 ''' Relational database (SQL) backend common code.
 
 Basics:
@@ -2650,9 +2650,10 @@
 
         Pass on the content-type property for the content property.
         '''
-        Class.index(nodeid)
-        mime_type = self.get(itemid, 'type')
-        if not mime_type:
+        Class.index(self, nodeid)
+        try:
+            mime_type = self.get(nodeid, 'type', self.default_mime_type)
+        except KeyError:
             mime_type = self.default_mime_type
         self.db.indexer.add_text((self.classname, nodeid, 'content'),
             str(self.get(nodeid, 'content')), mime_type)

Roundup Issue Tracker: http://roundup-tracker.org/