Commit 9840e8ce by Xiaofei Wang Committed by Copybara-Service

Internal change

PiperOrigin-RevId: 485430599
parent 5e956311
......@@ -162,7 +162,7 @@ struct type_caster<absl::Time> {
// Conversion part 1 (Python->C++)
bool load(handle src, bool convert) {
// Ensure that absl::Duration is converted from a Python datetime.date.
if (!convert || !hasattr(src, "year") || !hasattr(src, "month") ||
if (!hasattr(src, "year") || !hasattr(src, "month") ||
!hasattr(src, "day")) {
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment