From 86283ce99d0b10b7dc07de69121b8ee950cb44bf Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 27 Mar 2004 00:01:48 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2220 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + templates/classic/detectors/statusauditor.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2d20e4c..b459d60 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,7 @@ Fixed: - sqlite backend wasn't migrating multilink tables correctly - use SimpleCookie instead of Cookie (is an alias for the evil SmartCookie) - handle older sessions in session dbm +- make presetunread more resilient to status Class changes 2004-03-24 0.7.0b1 diff --git a/templates/classic/detectors/statusauditor.py b/templates/classic/detectors/statusauditor.py index ccc5c82..75e4962 100644 --- a/templates/classic/detectors/statusauditor.py +++ b/templates/classic/detectors/statusauditor.py @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -#$Id: statusauditor.py,v 1.4 2003-10-24 15:51:43 jlgijsbers Exp $ +#$Id: statusauditor.py,v 1.5 2004-03-27 00:01:48 richard Exp $ def chatty(db, cl, nodeid, newvalues): ''' If the issue is currently 'unread', 'resolved', 'done-cbb' or None, @@ -66,8 +66,15 @@ def presetunread(db, cl, nodeid, newvalues): if newvalues.has_key('status') and newvalues['status']: return + # get the unread state ID + try: + unread_id = db.status.lookup('unread') + except KeyError: + # no unread state, ignore all this stuff + return + # ok, do it - newvalues['status'] = db.status.lookup('unread') + newvalues['status'] = unread_id def init(db): -- 2.30.2