fix(get_events): Pass date objects instead of string

Closes https://github.com/frappe/frappe/issues/32246

(cherry picked from commit a4590fa4cc09b44c444e10f212f31fc26f4f81aa)
This commit is contained in:
Gavin D'souza 2025-04-23 00:23:19 +02:00 committed by Mergify
parent 3cd9b577e2
commit 6fdbbb70ce
2 changed files with 4 additions and 4 deletions

View file

@ -37,8 +37,8 @@ def get_things_todo(as_list=False):
def get_todays_events(as_list: bool = False):
"""Return a count of today's events in calendar."""
from frappe.desk.doctype.event.event import get_events
from frappe.utils import nowdate
from frappe.utils import getdate
today = nowdate()
today = getdate()
events = get_events(today, today)
return events if as_list else len(events)

View file

@ -3,7 +3,7 @@
import json
from datetime import date, datetime, timedelta
from datetime import date, datetime
import frappe
from frappe import _
@ -241,7 +241,7 @@ def has_permission(doc, user):
def send_event_digest():
today = nowdate()
today = getdate()
# select only those users that have event reminder email notifications enabled
users = [