2
2
3
3
from office365 .runtime .paths .resource_path import ResourcePath
4
4
from office365 .sharepoint .entity import Entity
5
- from office365 .sharepoint .navigation .node_collection import NavigationNodeCollection
6
5
from office365 .sharepoint .translation .user_resource import UserResource
7
6
8
7
@@ -20,8 +19,12 @@ def __repr__(self):
20
19
21
20
@property
22
21
def children (self ):
23
- # type: () -> NavigationNodeCollection
22
+ # type: () -> ' NavigationNodeCollection'
24
23
"""Gets the collection of child nodes of the navigation node."""
24
+ from office365 .sharepoint .navigation .node_collection import (
25
+ NavigationNodeCollection ,
26
+ )
27
+
25
28
return self .properties .get (
26
29
"Children" ,
27
30
NavigationNodeCollection (
@@ -66,7 +69,7 @@ def is_external(self):
66
69
67
70
@property
68
71
def parent_collection (self ):
69
- # type: () -> NavigationNodeCollection
72
+ # type: () -> ' NavigationNodeCollection'
70
73
return self ._parent_collection
71
74
72
75
@property
@@ -84,13 +87,3 @@ def get_property(self, name, default_value=None):
84
87
property_mapping = {"TitleResource" : self .title_resource }
85
88
default_value = property_mapping .get (name , None )
86
89
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