agritheory / approvals

Customizable Approval Workflows
Other
4 stars 1 forks source link

fix: check for docstatus if doc is submittable #63

Open MyuddinKhatri opened 1 month ago

MyuddinKhatri commented 1 month ago

closes #45

check for docstatus if doc is submittable instead of string "Approved"

MyuddinKhatri commented 1 month ago

@agritheory json_diff is complaining about field_name does not exist in property setter, pre-commit removed it its value was null, should we add a check to ignore field_name while iterating through property setter to leave it as it is even though the value is null?

github-actions[bot] commented 1 month ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py10100% 
hooks.py120100% 
install.py880%1, 4–5, 8–11, 17
approvals
   __init__.py00100% 
   api.py19111738%21, 44, 59–60, 69, 71, 91–92, 94, 120–133, 135–140, 142–143, 145, 150–159, 164–167, 178, 180–185, 187–188, 190, 192–196, 198, 200–201, 206, 209–210, 213, 218, 222–223, 227–228, 233–237, 239–244, 249–250, 254–263, 268–269, 271, 274–275, 277–279, 281, 295, 311, 313–318, 328, 330–332
approvals/doctype
   __init__.py00100% 
approvals/doctype/approval_doctype
   __init__.py00100% 
   approval_doctype.py30100% 
approvals/doctype/document_approval
   __init__.py00100% 
   document_approval.py15150%1–3, 6–9, 11–14, 16–17, 26–27
   test_document_approval.py30100% 
approvals/doctype/document_approval_rule
   __init__.py00100% 
   document_approval_rule.py651183%9, 19, 22, 25, 50, 61, 64, 69, 74–75, 86
   test_document_approval_rule.py30100% 
approvals/doctype/document_approval_settings
   __init__.py00100% 
   document_approval_settings.py15286%18–19
   test_document_approval_settings.py30100% 
approvals/doctype/user_document_approval
   __init__.py00100% 
   test_user_document_approval.py30100% 
   user_document_approval.py28280%1–4, 7–9, 11–12, 14–15, 17–18, 20–31, 33–34, 37
approvals/notification
   __init__.py00100% 
approvals/notification/approval_notification
   __init__.py00100% 
   approval_notification.py330%1, 4, 6
approvals/notification/rejection_notification
   __init__.py00100% 
   rejection_notification.py330%1, 4, 6
config
   __init__.py00100% 
   desktop.py330%1, 4–5
   docs.py220%10–11
tests
   conftest.py23291%25–26
   test_approval_workflow.py200100% 
   test_non_workflow_approval.py352140%13, 18, 23, 31–32, 35–37, 44, 46–55, 57–58
TOTAL43921551%