fix: convert eval string to dict

This commit is contained in:
Jannat Patel
2024-06-12 10:42:47 +05:30
parent 8a74f495e7
commit 479ff037c6

View File

@@ -15,6 +15,7 @@ from frappe.utils import (
get_time,
)
from lms.lms.utils import get_evaluator
import json
class LMSCertificateRequest(Document):
@@ -121,6 +122,9 @@ def schedule_evals():
@frappe.whitelist()
def setup_calendar_event(eval):
if isinstance(eval, str):
eval = frappe._dict(json.loads(eval))
calendar = frappe.db.get_value(
"Google Calendar", {"user": eval.evaluator, "enable": 1}, "name"
)