Update docs/en/samples/pre_post_processing/python/adk/agent.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Twisha Bansal
2026-02-09 11:23:23 +05:30
committed by GitHub
parent b0947b2adc
commit 7e175c62a0

View File

@@ -33,9 +33,7 @@ async def before_tool_callback(
tool_name = tool.name
print(f"POLICY CHECK: Intercepting '{tool_name}'")
if tool_name == "update-hotel" or (
"checkin_date" in args and "checkout_date" in args
):
if "checkin_date" in args and "checkout_date" in args:
start = datetime.fromisoformat(args["checkin_date"])
end = datetime.fromisoformat(args["checkout_date"])
duration = (end - start).days