Browse Source

Fix: ToDo Patch and Notifications query

version-14
Anand Doshi 11 years ago
parent
commit
1f16c1d615
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      webnotes/core/notifications.py
  2. +1
    -0
      webnotes/patches/4_0/set_todo_checked_as_closed.py

+ 1
- 1
webnotes/core/notifications.py View File

@@ -22,7 +22,7 @@ def get_things_todo():
"""Returns a count of incomplete todos"""
incomplete_todos = webnotes.conn.sql("""\
SELECT COUNT(*) FROM `tabToDo`
WHERE IFNULL(checked, 0) = 0
WHERE status="Open"
AND (owner = %s or assigned_by=%s)""", (webnotes.session.user, webnotes.session.user))
return incomplete_todos[0][0]



+ 1
- 0
webnotes/patches/4_0/set_todo_checked_as_closed.py View File

@@ -1,4 +1,5 @@
import webnotes

def execute():
webnotes.reload_doc("core", "doctype", "todo")
webnotes.conn.sql("""update tabToDo set status = if(ifnull(checked,0)=0, 'Open', 'Closed')""")

Loading…
Cancel
Save