ramodels 43.10.0__py3-none-any.whl → 44.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,7 +86,7 @@ class OrganisationUnit(MOBase):
86
86
  org_unit_type: OrgUnitType = Field(
87
87
  description="Reference to the organisation unit type."
88
88
  )
89
- org_unit_level: OrgUnitLevel = Field(
89
+ org_unit_level: OrgUnitLevel | None = Field(
90
90
  description="Reference to the organisation unit level type."
91
91
  )
92
92
  details: list[OrgUnitDetails] | None = Field(
@@ -103,10 +103,10 @@ class OrganisationUnit(MOBase):
103
103
  user_key: str,
104
104
  name: str,
105
105
  org_unit_type_uuid: UUID,
106
- org_unit_level_uuid: UUID,
107
106
  from_date: str,
108
107
  uuid: UUID | None = None,
109
108
  parent_uuid: UUID | None = None,
109
+ org_unit_level_uuid: UUID | None = None,
110
110
  org_unit_hierarchy_uuid: UUID | None = None,
111
111
  to_date: str | None = None,
112
112
  ) -> "OrganisationUnit":
@@ -117,6 +117,10 @@ class OrganisationUnit(MOBase):
117
117
  if org_unit_hierarchy_uuid
118
118
  else None
119
119
  )
120
+ org_unit_level = (
121
+ OrgUnitLevel(uuid=org_unit_level_uuid) if org_unit_level_uuid else None
122
+ )
123
+
120
124
  validity = Validity(from_date=from_date, to_date=to_date)
121
125
 
122
126
  return cls(
@@ -127,7 +131,7 @@ class OrganisationUnit(MOBase):
127
131
  parent=parent,
128
132
  org_unit_hierarchy=org_unit_hierarchy,
129
133
  org_unit_type=OrgUnitType(uuid=org_unit_type_uuid),
130
- org_unit_level=OrgUnitLevel(uuid=org_unit_level_uuid),
134
+ org_unit_level=org_unit_level,
131
135
  )
132
136
 
133
137
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ramodels
3
- Version: 43.10.0
3
+ Version: 44.0.0
4
4
  Summary: Pydantic data models for OS2mo
5
5
  Home-page: https://magenta.dk/
6
6
  License: MPL-2.0
@@ -26,9 +26,9 @@ ramodels/mo/details/role.py,sha256=h-x1M4jCo3Er7EDoSW10B7BEN4dNecXyC55hvfVdZ9o,1
26
26
  ramodels/mo/employee.py,sha256=tV7BQ5axoI2bk1SUfob9PwOcC1CJeS7MkpFL8VaMuk8,5632
27
27
  ramodels/mo/facet.py,sha256=0uBIzRd--NTJ-Ga9bemgmGnLdM0Opxns9hc_JaRcJUg,1230
28
28
  ramodels/mo/organisation.py,sha256=eIgsq4zASAhyaz05oDNJxkw1Xazx2mVA-r9MjJ6cESo,368
29
- ramodels/mo/organisation_unit.py,sha256=Uv7fN3a-jelrcznWNB4GFAQj160VQPMkZMPbhMlFddU,4691
29
+ ramodels/mo/organisation_unit.py,sha256=TcfDGZQaOBUcug69TzzpQc8xQb8LVms-qfC73lHbUoU,4810
30
30
  ramodels/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
- ramodels-43.10.0.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
32
- ramodels-43.10.0.dist-info/METADATA,sha256=RSLhTsxv57O4LWHAnmfYc-gl6mc1U1bFajWI09z72gQ,2719
33
- ramodels-43.10.0.dist-info/entry_points.txt,sha256=VdwoHqN9Q0eDQYWWImhzF-YpBAk2AL4a5ydjOMKYr5c,55
34
- ramodels-43.10.0.dist-info/RECORD,,
31
+ ramodels-44.0.0.dist-info/entry_points.txt,sha256=VdwoHqN9Q0eDQYWWImhzF-YpBAk2AL4a5ydjOMKYr5c,55
32
+ ramodels-44.0.0.dist-info/METADATA,sha256=pk6sB4SE8EjyYCoQiucOWgRr2CJ7l9N-vL8M3_2i4oA,2718
33
+ ramodels-44.0.0.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
34
+ ramodels-44.0.0.dist-info/RECORD,,