allura
修订版 | 7941b68485b3f2d6fcc037a46d6889bf5d4f3cd9 (tree) |
---|---|
时间 | 2011-11-11 03:47:14 |
作者 | Rick Copeland <rcopeland@geek...> |
Commiter | John Hoffmann |
[#2718] Make project.get_tool_data take a default argument that does something
Signed-off-by: Rick Copeland <rcopeland@geek.net>
@@ -183,7 +183,7 @@ class Project(MappedClass): | ||
183 | 183 | return TroveCategory.query.find({'_id':{'$in':getattr(self,'trove_%s' % trove_type)}}).all() |
184 | 184 | |
185 | 185 | def get_tool_data(self, tool, key, default=None): |
186 | - return self.tool_data.get(tool, {}).get(key, None) | |
186 | + return self.tool_data.get(tool, {}).get(key, default) | |
187 | 187 | |
188 | 188 | def set_tool_data(self, tool, **kw): |
189 | 189 | d = self.tool_data.setdefault(tool, {}) |