People should be able to get a todo regardless of its active/inactive status.

This commit is contained in:
Jeremy Fincher 2003-12-07 01:19:00 +00:00
parent 2ec97484f3
commit be7a2921e2
2 changed files with 2 additions and 2 deletions

View File

@ -152,8 +152,7 @@ class Todo(callbacks.Privmsg):
return return
else: else:
cursor.execute("""SELECT userid, priority, added_at, task cursor.execute("""SELECT userid, priority, added_at, task
FROM todo WHERE id = %s FROM todo WHERE id = %s""", taskid)
AND active = 1""", taskid)
if cursor.rowcount == 0: if cursor.rowcount == 0:
irc.error(msg, '%r is not a valid task id' % taskid) irc.error(msg, '%r is not a valid task id' % taskid)
return return

View File

@ -79,6 +79,7 @@ if sqlite is not None:
def testRemovetodo(self): def testRemovetodo(self):
self.assertNotError('todo add do something else') self.assertNotError('todo add do something else')
self.assertNotError('todo remove 1') self.assertNotError('todo remove 1')
self.assertNotError('todo 1')
def testSearchtodo(self): def testSearchtodo(self):
self.assertNotError('todo add task number one') self.assertNotError('todo add task number one')