-
Notifications
You must be signed in to change notification settings - Fork 308
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
fix: AccessEntry API representation parsing #1682
fix: AccessEntry API representation parsing #1682
Conversation
Overriding the `AccessEntry#_properties` with a deep copy of the API resource overwrites the `role` property set in `AccessEntry.__init__` which isn't present in the resource if the `role` is set to `None`. This causes `AccessEntry`s generated from API representations to no longer evaluate to equal with equivalent `AccessEntry` resources instantiated through `AccessEntry.__init__`. The added unit test fails without the change and passes with the change.
Hi @jonathan-ostrander, thank you so much for your contribution! The PR looks good, but it seems the lint test failed. As seen in the kokoro results: Please see the instructions in the contribution doc for more info on coding style. If you need any help, please let us know! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix linting error
Overriding the
AccessEntry#_properties
with a deep copy of the API resource overwrites therole
property set inAccessEntry.__init__
which isn't present in the resource if therole
is set toNone
. This causesAccessEntry
s generated from API representations to no longer evaluate to equal with equivalentAccessEntry
resources instantiated throughAccessEntry.__init__
. The added unit test fails without the change and passes with the change.Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #1681 🦕