@frappe.whitelist()
def mark_as_seen(note):
    note = frappe.get_doc('Note', note)
    if (frappe.session.user not in [d.user for d in note.seen_by]):
        note.append('seen_by', {'user': frappe.session.user})
        note.save(ignore_version=True)
@frappe.whitelist()
def mark_as_seen(note):
    note = frappe.get_doc('Note', note)
    if (frappe.session.user not in [d.user for d in note.seen_by]):
        note.append('seen_by', {'user': frappe.session.user})
        note.save(ignore_version=True)