Skip to content

Commit

Permalink
Merge pull request googleapis#217 from jtweeder/sharepoint_subsites_fix
Browse files Browse the repository at this point in the history
Use just resource_prefix if parent is a site
  • Loading branch information
Alejandro Casanovas authored Mar 28, 2019
2 parents c830f33 + e7bb786 commit cc7c9bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion O365/sharepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ def __init__(self, *, parent=None, con=None, **kwargs):

# prefix with the current known site
resource_prefix = 'sites/{site_id}'.format(site_id=self.object_id)
main_resource = '{}{}'.format(main_resource, resource_prefix)
main_resource = (resource_prefix if isinstance(parent,Site)
else '{}{}'.format(main_resource, resource_prefix))

super().__init__(
protocol=parent.protocol if parent else kwargs.get('protocol'),
Expand Down

0 comments on commit cc7c9bd

Please sign in to comment.