mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-12-18 19:32:21 -06:00
Copybara import of the project:
-- 1ca16aba5b7b869afa8e0a0cddaea539acd737f5 by bart.lee(이철민)/kakao <bart.lee@kakaocorp.com>: chore: Improves session update time validation message Enhances the error message when a session's last update time is later than the storage update time. This provides better readability by formatting the timestamps in the error message. COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/446 from kakao-bart-lee:main a2a0cff036429b61bd7cf1600fc4c2c0cf50089d PiperOrigin-RevId: 754452381
This commit is contained in:
@@ -484,9 +484,11 @@ class DatabaseSessionService(BaseSessionService):
|
||||
|
||||
if storage_session.update_time.timestamp() > session.last_update_time:
|
||||
raise ValueError(
|
||||
f"Session last_update_time {session.last_update_time} is later than"
|
||||
f" the upate_time in storage {storage_session.update_time}"
|
||||
)
|
||||
f"Session last_update_time "
|
||||
f"{datetime.fromtimestamp(session.last_update_time):%Y-%m-%d %H:%M:%S} "
|
||||
f"is later than the update_time in storage "
|
||||
f"{storage_session.update_time:%Y-%m-%d %H:%M:%S}"
|
||||
)
|
||||
|
||||
# Fetch states from storage
|
||||
storage_app_state = sessionFactory.get(
|
||||
|
||||
@@ -83,8 +83,7 @@ class OperationParser:
|
||||
schema.description = (
|
||||
description if not schema.description else schema.description
|
||||
)
|
||||
# param.required can be None
|
||||
required = param.required if param.required is not None else False
|
||||
required = param.required
|
||||
|
||||
self.params.append(
|
||||
ApiParameter(
|
||||
|
||||
Reference in New Issue
Block a user