22
33from office365 .runtime .paths .resource_path import ResourcePath
44from office365 .sharepoint .entity import Entity
5- from office365 .sharepoint .navigation .node_collection import NavigationNodeCollection
65from office365 .sharepoint .translation .user_resource import UserResource
76
87
@@ -20,8 +19,12 @@ def __repr__(self):
2019
2120 @property
2221 def children (self ):
23- # type: () -> NavigationNodeCollection
22+ # type: () -> ' NavigationNodeCollection'
2423 """Gets the collection of child nodes of the navigation node."""
24+ from office365 .sharepoint .navigation .node_collection import (
25+ NavigationNodeCollection ,
26+ )
27+
2528 return self .properties .get (
2629 "Children" ,
2730 NavigationNodeCollection (
@@ -66,7 +69,7 @@ def is_external(self):
6669
6770 @property
6871 def parent_collection (self ):
69- # type: () -> NavigationNodeCollection
72+ # type: () -> ' NavigationNodeCollection'
7073 return self ._parent_collection
7174
7275 @property
@@ -84,13 +87,3 @@ def get_property(self, name, default_value=None):
8487 property_mapping = {"TitleResource" : self .title_resource }
8588 default_value = property_mapping .get (name , None )
8689 return super (NavigationNode , self ).get_property (name , default_value )
87-
88- def set_property (self , name , value , persist_changes = True ):
89- super (NavigationNode , self ).set_property (name , value , persist_changes )
90- # fallback: create a new resource path
91- if self ._resource_path is None :
92- if name == "Id" :
93- self ._resource_path = self .parent_collection .get_by_id (
94- value
95- ).resource_path
96- return self
0 commit comments