fix(get_last_doc): Allow for_update as kwarg only
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
This commit is contained in:
parent
d1fbab1c45
commit
f40214bca8
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue