Skip to content

Conversation

@maxdeviant
Copy link
Contributor

This PR fixes an issue where the organizations property was missing from the Client.

Resolves SDK-195.

@maxdeviant maxdeviant self-assigned this May 15, 2021
@maxdeviant maxdeviant requested a review from a team as a code owner May 15, 2021 00:23
@linear
Copy link

linear bot commented May 15, 2021

SDK-195 `organizations` not exposed on `Client` in Python SDK

Reported by Relyance:

We’ve been looking at upgrading our code to v1.0.0, but I’m having trouble with this list_organizations function.   The release notes say that list_organizations have been moved “from the portal namespace to organizations”, and I see your documentation here https://workos.com/docs/reference/organization/list — specifically gives an example of accessing the organizations namespace through client:

from workos import client
...
response = client.organizations.list_organizations(domains=['foo-corp.com'])

But when I do this, I get an error

AttributeError: 'Client' object has no attribute 'organizations'

When I actually look at the client.py source (from the link in your release notes), there doesn’t seem to be any @property that would allow organizations to be accessed through client, the way portal is.    Am I doing something wrong?

@codecov-commenter
Copy link

Codecov Report

Merging #73 (8913d33) into master (53c1136) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   93.10%   93.19%   +0.09%     
==========================================
  Files          17       17              
  Lines         377      382       +5     
==========================================
+ Hits          351      356       +5     
  Misses         26       26              
Impacted Files Coverage Δ
workos/utils/validation.py 100.00% <ø> (ø)
workos/client.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53c1136...8913d33. Read the comment docs.

@maxdeviant maxdeviant merged commit 9853e88 into master May 15, 2021
@maxdeviant maxdeviant deleted the expose-organizations-on-client branch May 15, 2021 00:29
@maxdeviant maxdeviant mentioned this pull request May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants