fix: Consider `__unsaved` flag while getting doc as_dict (#10067)
fix: Consider `__unsaved` flag while getting doc as_dict (#10067)

Co-authored-by: Prssanna Desai <ba340bf3c11112b5a70a8966f61561eb8bf2b39f@gmail.com>

Co-authored-by: Prssanna Desai <ba340bf3c11112b5a70a8966f61561eb8bf2b39f@gmail.com>
(cherry picked from commit 9122866c625c40032fd22d04718bbba2db8cb208)

almeidapaulopt/frappe,mhbu50/frappe,frappe/frappe,StrellaGroup/frappe,saurabh6790/frappe,mhbu50/frappe,yashodhank/frappe,StrellaGroup/frappe,yashodhank/frappe,frappe/frappe,saurabh6790/frappe,saurabh6790/frappe,frappe/frappe,almeidapaulopt/frappe,yashodhank/frappe,StrellaGroup/frappe,mhbu50/frappe,almeidapaulopt/frappe,mhbu50/frappe,almeidapaulopt/frappe,yashodhank/frappe,saurabh6790/frappe