-
Notifications
You must be signed in to change notification settings - Fork 12
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
Mutating array relationships directly does not work #40
Comments
I think there's a not-too-difficult path to fixing this, by creating a new ResourceList object that emulates a list. Well, it mostly just is a list, but it passes actions down the line to the underlying _resource object that, in the example given by @boydgreenfield, doesn't get updated. |
polyatail
added a commit
that referenced
this issue
Nov 16, 2018
polyatail
added a commit
that referenced
this issue
Nov 16, 2018
* Explicitly disallow unsupported comparisons between API models * Added tests for ResourceLists, and comparison between models
polyatail
added a commit
that referenced
this issue
Nov 16, 2018
* Explicitly disallow unsupported comparisons between API models * Added tests for ResourceLists, and comparison between models
polyatail
added a commit
that referenced
this issue
Nov 16, 2018
* Explicitly disallow unsupported comparisons between API models * Added tests for ResourceLists, and comparison between models
polyatail
added a commit
that referenced
this issue
Nov 16, 2018
* Explicitly disallow unsupported comparisons between API models * Added tests for ResourceLists, and comparison between models
polyatail
added a commit
that referenced
this issue
Nov 17, 2018
* Explicitly disallow unsupported comparisons between API models * Added tests for ResourceLists, and comparison between models
boydgreenfield
pushed a commit
that referenced
this issue
Nov 17, 2018
* Add ResourceList to fix API list access (#40) * Explicitly disallow unsupported comparisons between API models * Added tests for ResourceLists, and comparison between models * Style tweak
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
sample.tags.append(new_tag)
counterintuitively fails, and does not includenew_tag
. This is because we're creating thetags
attribute on the fly and wrapping the underlyingpotion-client
resource, i.e., creating a new list with each__getattr__
call.The TODO here is to update how we handle arrays in the API so that the above operations (as well as
pop
, etc.) work properly.In the meantime, users should use the following workaround:
The text was updated successfully, but these errors were encountered: