Added association ref to committees
This commit is contained in:
parent
9f725d85e4
commit
c8b777b42d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user