Enhancement: support assigning custom fields via consumption templates (#4727)

This commit is contained in:
shamoon
2023-12-03 15:35:30 -08:00
committed by GitHub
parent 285a4b5aef
commit f27f25aa03
14 changed files with 260 additions and 136 deletions

View File

@@ -28,6 +28,7 @@ class DocumentMetadataOverrides:
view_groups: Optional[list[int]] = None
change_users: Optional[list[int]] = None
change_groups: Optional[list[int]] = None
custom_field_ids: Optional[list[int]] = None
def update(self, other: "DocumentMetadataOverrides") -> "DocumentMetadataOverrides":
"""
@@ -74,6 +75,12 @@ class DocumentMetadataOverrides:
self.change_groups = other.change_groups
elif other.change_groups is not None:
self.change_groups.extend(other.change_groups)
if self.custom_field_ids is None:
self.custom_field_ids = other.custom_field_ids
elif other.custom_field_ids is not None:
self.custom_field_ids.extend(other.custom_field_ids)
return self