Skip to content

Commit 1c81231

Browse files
author
Richard Jones
committed
*** empty log message ***
1 parent 1fc17d0 commit 1c81231

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Fixed:
2222
- sqlite backend wasn't migrating multilink tables correctly
2323
- use SimpleCookie instead of Cookie (is an alias for the evil SmartCookie)
2424
- handle older sessions in session dbm
25+
- make presetunread more resilient to status Class changes
2526

2627

2728
2004-03-24 0.7.0b1

templates/classic/detectors/statusauditor.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020
#
21-
#$Id: statusauditor.py,v 1.4 2003-10-24 15:51:43 jlgijsbers Exp $
21+
#$Id: statusauditor.py,v 1.5 2004-03-27 00:01:48 richard Exp $
2222

2323
def chatty(db, cl, nodeid, newvalues):
2424
''' If the issue is currently 'unread', 'resolved', 'done-cbb' or None,
@@ -66,8 +66,15 @@ def presetunread(db, cl, nodeid, newvalues):
6666
if newvalues.has_key('status') and newvalues['status']:
6767
return
6868

69+
# get the unread state ID
70+
try:
71+
unread_id = db.status.lookup('unread')
72+
except KeyError:
73+
# no unread state, ignore all this stuff
74+
return
75+
6976
# ok, do it
70-
newvalues['status'] = db.status.lookup('unread')
77+
newvalues['status'] = unread_id
7178

7279

7380
def init(db):

0 commit comments

Comments
 (0)