fixed remnants of old system
This commit is contained in:
parent
f5e165aa11
commit
57fc551e64
@ -26,10 +26,10 @@ class CommitteeModel(BaseModel):
|
|||||||
|
|
||||||
@model_validator(mode='after')
|
@model_validator(mode='after')
|
||||||
def current_edition_in_editions(self) -> Self:
|
def current_edition_in_editions(self) -> Self:
|
||||||
uuid = self.current_edition.uuid
|
uuid = self.current_edition
|
||||||
if uuid is None:
|
if uuid is None:
|
||||||
return self
|
return self
|
||||||
if uuid not in self.editions.uuids:
|
if uuid not in self.editions:
|
||||||
raise ValueError("Current edition must be in list of editions")
|
raise ValueError("Current edition must be in list of editions")
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@ -45,6 +45,6 @@ class CommitteeEditionModel(BaseModel):
|
|||||||
@model_validator(mode='after')
|
@model_validator(mode='after')
|
||||||
def functions_to_members_only(self) -> Self:
|
def functions_to_members_only(self) -> Self:
|
||||||
for uuid in self.functions.keys():
|
for uuid in self.functions.keys():
|
||||||
if uuid not in self.members.uuids:
|
if uuid not in self.members:
|
||||||
raise ValueError("Cannot only assign functions to members")
|
raise ValueError("Cannot only assign functions to members")
|
||||||
return self
|
return self
|
||||||
Loading…
x
Reference in New Issue
Block a user