fix: move ifnull logic to applicaiton for better orm support
This commit is contained in:
parent
14e46495c0
commit
2b08d7c348
1 changed files with 5 additions and 1 deletions
|
|
@ -55,8 +55,12 @@ def create_email_flag_queue(names, action):
|
|||
|
||||
for name in json.loads(names or []):
|
||||
uid, seen_status, email_account = frappe.db.get_value(
|
||||
"Communication", name, ["ifnull(uid, -1)", "ifnull(seen, 0)", "email_account"]
|
||||
"Communication", name, ["uid", "seen", "email_account"]
|
||||
)
|
||||
if not uid:
|
||||
uid = -1
|
||||
if not seen_status:
|
||||
seen_status = 0
|
||||
|
||||
# can not mark email SEEN or UNSEEN without uid
|
||||
if not uid or uid == -1:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue