aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bugdir.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-01-20 16:25:18 -0500
committerW. Trevor King <wking@drexel.edu>2010-01-20 16:25:18 -0500
commitdc77d9d23ed4707430c33f440ad8edd60b6e24d6 (patch)
tree183fc243ace2c6d3bb691c2818e4985fd6b84618 /libbe/bugdir.py
parent55f1e8588edc35410dd16b883e7cddd06ebc4ed6 (diff)
downloadbugseverywhere-dc77d9d23ed4707430c33f440ad8edd60b6e24d6.tar.gz
Fix BugDir._uuid_cache management for new_bug()/remove_bug().
Initial implementation in wking@drexel.edu-20100120192451-j206hn1s78u9a3ys missed them.
Diffstat (limited to 'libbe/bugdir.py')
-rw-r--r--libbe/bugdir.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbe/bugdir.py b/libbe/bugdir.py
index 4711a8f..7e47c33 100644
--- a/libbe/bugdir.py
+++ b/libbe/bugdir.py
@@ -261,9 +261,13 @@ class BugDir (list, settings_object.SavedSettingsObject):
from_storage=False)
self.append(bg)
self._bug_map_gen()
+ if hasattr(self, '_uuids_cache') and not bg.uuid in self._uuids_cache:
+ self._uuids_cache.append(bg.uuid)
return bg
def remove_bug(self, bug):
+ if hasattr(self, '_uuids_cache') and bug.uuid in self._uuids_cache:
+ self._uuids_cache.remove(bug.uuid)
self.remove(bug)
if self.storage != None and self.storage.is_writeable():
bug.remove()