From f40214bca8dee3564ec7a0c073c0e1ab3cd67502 Mon Sep 17 00:00:00 2001 From: gavin Date: Fri, 22 Jul 2022 13:34:04 +0530 Subject: [PATCH] fix(get_last_doc): Allow for_update as kwarg only Co-authored-by: Ankush Menat --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index 20fddb0267..e1fa902eba 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -1182,7 +1182,7 @@ def get_doc(*args, **kwargs) -> "Document": return doc -def get_last_doc(doctype, filters=None, order_by="creation desc", for_update=False): +def get_last_doc(doctype, filters=None, order_by="creation desc", *, for_update=False): """Get last created document of this type.""" d = get_all(doctype, filters=filters, limit_page_length=1, order_by=order_by, pluck="name") if d: