@@ -88,14 +88,12 @@ def check_data(data, fields, require_all_fields=True):
8888
8989user_node_child_fields = {
9090 "type" : (is_in_list (["user_node" , "content_node" ]),),
91- "id" : (schema_or (is_user_node , is_content_node ),),
9291 "start_time" : (schema_or (is_none , is_in_range (0 )),),
9392 "end_time" : (schema_or (is_none , is_in_range (0 )),),
9493 "title" : (is_string , ),
9594}
9695
9796user_node_fields = {
98- "id" : (is_int , ),
9997 "title" : (is_string , ),
10098 "parent" : (schema_or (is_none , is_user_node ), ),
10199 "owner" : (is_user , ),
@@ -105,7 +103,6 @@ def check_data(data, fields, require_all_fields=True):
105103}
106104
107105user_fields = {
108- "id" : (is_int , ),
109106 "name" : (is_string , ),
110107 "type" : (is_in_list (['admin' , 'teacher' , 'student' ]), ),
111108 "user_nodes" : (is_list , schema_list_check (is_user_node )),
@@ -114,7 +111,6 @@ def check_data(data, fields, require_all_fields=True):
114111}
115112
116113content_node_fields = {
117- 'id' : (is_int , ),
118114 'title' : (is_string , ),
119115 'text' : (is_string , ),
120116 'description' : (is_string , ),
0 commit comments