-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional fields in nested oneof
set to default value left out of field mask
#230
Comments
@BenRKarl Your example confuses me a bit: you supply an original_campaign = Campaign()
original_campaign.manual_cpc.enhanced_cpc_enabled = True
modified_campaign = Campaign()
modified_campaign.manual_cpc.enhanced_cpc_enabled = False
fm = field_mask(original_campaign._pb, modified_campaign._pb)
assert fm.paths == ["manual_cpc.enhanced_cpc_enabled"] |
Hi @BenRKarl , I'm going to close this issue due to inactivity but please feel free to re-open it with more information. |
@parthea just chiming in here with some additional context and clarify what I think the case @BenRKarl was trying to demonstrate with that example. It is possible that supplying an I am coming from Java, so I'll explain how we approach this there as a parallel. Rather than comparing Then, when determining if the the message sub-field (e.g. If the message is set on either the original or modified message, but not the other, we add the complete path to the update mask to get the expected result. I think this is effectively what we're trying to accomplish here. I'm just not familiar enough with these utilities in Python to no how to go about it. |
Thanks for providing an example @devchas. I've re-opened this issue as a feature request. |
Adds context to the full functionality required. We want to ensure that if a blank field with populated sub-fields is supplied that the error is raised before it reaches the server. |
Environment details
3.7.0
10.0.1
google-api-core
version:1.31.0
Steps to reproduce
Run the below code example.
Code example
Stack trace
The text was updated successfully, but these errors were encountered: