fix: rename type validation

`None` can be passed which is acceptable here.

TODO: Make slackdict accept none as bool and convert to False
This commit is contained in:
Ankush Menat 2023-09-03 19:46:31 +05:30
parent e0f87dc4e1
commit d5a21a2676
2 changed files with 2 additions and 4 deletions

View file

@ -1041,9 +1041,7 @@ class Document(BaseDocument):
return self._cancel()
@frappe.whitelist()
def rename(
self, name: str, merge: bool = False, force: bool = False, validate_rename: bool = True
):
def rename(self, name: str, merge=False, force=False, validate_rename=True):
"""Rename the document to `name`. This transforms the current object."""
return self._rename(name=name, merge=merge, force=force, validate_rename=validate_rename)

View file

@ -1,7 +1,7 @@
from collections.abc import Callable
from functools import lru_cache, wraps
from inspect import _empty, isclass, signature
from types import EllipsisType
from types import EllipsisType, NoneType
from typing import ForwardRef, TypeVar, Union
from pydantic import ConfigDict