From dc77d9d23ed4707430c33f440ad8edd60b6e24d6 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 20 Jan 2010 16:25:18 -0500 Subject: Fix BugDir._uuid_cache management for new_bug()/remove_bug(). Initial implementation in wking@drexel.edu-20100120192451-j206hn1s78u9a3ys missed them. --- libbe/bugdir.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbe/bugdir.py') 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() -- cgit