Added association ref to committees

This commit is contained in:
Tiago Scholten 2026-09-05 09:21:12 +02:00
parent 9f725d85e4
commit c8b777b42d

View File

@ -3,7 +3,8 @@ from pydantic import model_validator, UUID7
from fiber_package.refs import (
CommitteeEditionRef,
CommitteeEditionRefList,
EntityRefList
EntityRefList,
AssociationRef
)
from fiber_package.base import FiberBaseModel
@ -21,6 +22,8 @@ An edition is a definite group of members with functions and a timespan.
class CommitteeModel(FiberBaseModel):
collection_name: Literal["committee"] = "committee"
association: AssociationRef
full_name_en: str
full_name_nl: str
description_en: str = ""
@ -54,5 +57,5 @@ class CommitteeEditionModel(FiberBaseModel):
def functions_to_members_only(self) -> Self:
for uuid in self.functions:
if uuid not in self.members:
raise ValueError("Cannot only assign functions to committee members")
raise ValueError("Can only assign functions to committee members")
return self