This commit is contained in:
wrrrzr 2024-03-06 14:42:02 +03:00
parent 61dfd60781
commit c7a0d75c39

View file

@ -64,7 +64,7 @@ class BaseStorage(ABC):
"""
pass
async def get_value(self, key: StorageKey, data_key: str, default: Any) -> Any:
async def get_value(self, key: StorageKey, data_key: str, default: Any = None) -> Any:
"""
Get selected value by key in current data
@ -73,7 +73,7 @@ class BaseStorage(ABC):
:return: value of current data by key
"""
current_data = await self.get_data(key=key)
return current_data.get(data_key)
return current_data.get(data_key, default)
async def update_data(self, key: StorageKey, data: Dict[str, Any]) -> Dict[str, Any]:
"""