@@ -364,9 +364,9 @@ def check_mutability_issues(
364364 cls .check_mutability_issues (original_val , replacement_value )
365365
366366 def set_complex_attribute_urns (self ) -> None :
367- """Navigate through attributes and sub-attributes of type ComplexAttribute, and mark them with a '_schema ' attribute.
367+ """Navigate through attributes and sub-attributes of type ComplexAttribute, and mark them with a 'attribute_urn ' attribute.
368368
369- '_schema ' will later be used by 'get_attribute_urn'.
369+ 'attribute_urn ' will later be used by 'get_attribute_urn'.
370370 """
371371 from scim2_models .rfc7643 .resource import Resource
372372
@@ -378,7 +378,7 @@ def set_complex_attribute_urns(self) -> None:
378378 continue
379379
380380 main_schema = (
381- getattr (self , "_schema " , None )
381+ getattr (self , "attribute_urn " , None )
382382 or self .__class__ .model_fields ["schemas" ].default [0 ]
383383 )
384384
@@ -388,9 +388,9 @@ def set_complex_attribute_urns(self) -> None:
388388 if attr_value := getattr (self , field_name ):
389389 if isinstance (attr_value , list ):
390390 for item in attr_value :
391- item ._schema = schema
391+ item .attribute_urn = schema
392392 else :
393- attr_value ._schema = schema
393+ attr_value .attribute_urn = schema
394394
395395 @field_serializer ("*" , mode = "wrap" )
396396 def scim_serializer (
0 commit comments