瀏覽代碼

chore(notifications.py): remove unused get_unseen_likes

version-14
phot0n 3 年之前
父節點
當前提交
aeadcb1322
共有 1 個文件被更改,包括 0 次插入15 次删除
  1. +0
    -15
      frappe/core/notifications.py

+ 0
- 15
frappe/core/notifications.py 查看文件

@@ -39,18 +39,3 @@ def get_todays_events(as_list=False):
today = nowdate()
events = get_events(today, today)
return events if as_list else len(events)

def get_unseen_likes():
"""Returns count of unseen likes"""

comment_doctype = DocType("Comment")
return frappe.db.count(comment_doctype,
filters=(
(comment_doctype.comment_type == "Like")
& (comment_doctype.modified >= Now() - Interval(years=1))
& (comment_doctype.owner.notnull())
& (comment_doctype.owner != frappe.session.user)
& (comment_doctype.reference_owner == frappe.session.user)
& (comment_doctype.seen == 0)
)
)

Loading…
取消
儲存