Mercurial > p > roundup > code
diff roundup/backends/back_tsearch2.py @ 3017:f1cba8342186
Add EXPERIMENTAL warning, expand text/plain hack checking.
| author | Johannes Gijsbers <jlgijsbers@users.sourceforge.net> |
|---|---|
| date | Thu, 16 Dec 2004 22:34:34 +0000 |
| parents | 224c7c0b9708 |
| children | 293a17149765 |
line wrap: on
line diff
--- a/roundup/backends/back_tsearch2.py Thu Dec 16 22:22:55 2004 +0000 +++ b/roundup/backends/back_tsearch2.py Thu Dec 16 22:34:34 2004 +0000 @@ -1,3 +1,5 @@ +# Note: this backend is EXPERIMENTAL. Do not use if you value your data. + import re import psycopg @@ -210,6 +212,6 @@ default_mime_type = 'text/plain' def create(self, **propvalues): # figure the mime type - if not propvalues.get('type'): + if 'type' in self.getprops() and not propvalues.get('type'): propvalues['type'] = self.default_mime_type return Class.create(self, **propvalues)
