Skip to content

Commit a8acbbb

Browse files
author
Richard Jones
committed
anydbm fixes:
- Remove duplicate call to indexer - Remove defaulting of props to None unnecessarily -- masks get() with default values.
1 parent c49da5b commit a8acbbb

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

roundup/backends/back_anydbm.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.161 2004-07-20 05:57:54 richard Exp $
18+
#$Id: back_anydbm.py,v 1.162 2004-07-20 07:26:40 richard Exp $
1919
'''This module defines a backend that saves the hyperdatabase in a
2020
database chosen by anydbm. It is guaranteed to always be available in python
2121
versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
@@ -896,8 +896,6 @@ def create_inner(self, **propvalues):
896896
raise ValueError, 'key property "%s" is required'%key
897897
if isinstance(prop, Multilink):
898898
propvalues[key] = []
899-
else:
900-
propvalues[key] = None
901899

902900
# done
903901
self.db.addnode(self.classname, newid, propvalues)
@@ -2058,10 +2056,6 @@ def create(self, **propvalues):
20582056
# do the database create
20592057
newid = self.create_inner(**propvalues)
20602058

2061-
# and index!
2062-
self.db.indexer.add_text((self.classname, newid, 'content'), content,
2063-
mime_type)
2064-
20652059
# fire reactors
20662060
self.fireReactors('create', newid, None)
20672061

0 commit comments

Comments
 (0)