Missing object ServicePlansCollectionPage
nka11 opened this issue · 3 comments
nka11 commented
File "/usr/local/lib/python3.6/site-packages/msgraph/request/subscribed_sku_request_builder.py", line 62, in get
return self.request().get()
File "/usr/local/lib/python3.6/site-packages/msgraph/request/subscribed_sku_request.py", line 50, in get
self._initialize_collection_properties(entity)
File "/usr/local/lib/python3.6/site-packages/msgraph/request/subscribed_sku_request.py", line 103, in _initialize_collection_properties
if value.service_plans and value.service_plans._prop_dict:
File "/usr/local/lib/python3.6/site-packages/msgraph/model/subscribed_sku.py", line 84, in service_plans
return ServicePlansCollectionPage(self._prop_dict["servicePlans"])
NameError: name 'ServicePlansCollectionPage' is not defined
Tried to find ServicePlansCollectionPage but any class or file with that name exist 👍
/ # grep -r ServicePlansCollectionPage /usr/local/lib/python3.6/site-packages/msgraph/*
/usr/local/lib/python3.6/site-packages/msgraph/model/__pycache__/subscribed_sku.cpython-36.pyc: :class:`ServicePlansCollectionPage<microsoft.graph.request.service_plans_collection.ServicePlansCollectionPage>`:
/usr/local/lib/python3.6/site-packages/msgraph/model/__pycache__/subscribed_sku.cpython-36.pyc:ZServicePlansCollectionPage)r
/usr/local/lib/python3.6/site-packages/msgraph/model/subscribed_sku.py: :class:`ServicePlansCollectionPage<microsoft.graph.request.service_plans_collection.ServicePlansCollectionPage>`:
/usr/local/lib/python3.6/site-packages/msgraph/model/subscribed_sku.py: return ServicePlansCollectionPage(self._prop_dict["servicePlans"])
code :
client.subscribed_skus.get() # this works
client.subscribed_skus[SKUID].get() # this is broken
nka11 commented
And same problem for AssignedLicensesCollectionPage
File "/usr/local/lib/python3.6/site-packages/msgraph/request/user_request.py", line 50, in get
self._initialize_collection_properties(entity)
File "/usr/local/lib/python3.6/site-packages/msgraph/request/user_request.py", line 103, in _initialize_collection_properties
if value.assigned_licenses and value.assigned_licenses._prop_dict:
File "/usr/local/lib/python3.6/site-packages/msgraph/model/user.py", line 46, in assigned_licenses
return AssignedLicensesCollectionPage(self._prop_dict["assignedLicenses"])
NameError: name 'AssignedLicensesCollectionPage' is not defined
Original problem might be the lack of unit tests (only the base classes are tested)
And maybe it's related to #20 too...
dpim commented
Thanks for bringing this to our attention. We will add this to our backlog. If you'd like to contribute a fix (or additional test cases) in the meantime, we have a repo for our generation tool-chain with documentation
caitlinrussell commented
Closing as we are archiving this project