- Fixed Error where Catalog Types other than default could not be added
- Fixed error in TRAICIE_KO_INTERVIEW_DEFINITION_SPECIALIST - Minor improvements
This commit is contained in:
@@ -43,3 +43,11 @@ class KOQuestions(BaseModel):
|
||||
"""Get the list of KOQuestion objects"""
|
||||
return self.ko_questions
|
||||
|
||||
def get_by_title(self, title: str) -> Optional[KOQuestion]:
|
||||
return next((q for q in self.ko_questions if q.title == title), None)
|
||||
|
||||
def get_next_by_title(self, title: str) -> Optional[KOQuestion]:
|
||||
for idx, q in enumerate(self.ko_questions):
|
||||
if q.title == title:
|
||||
return self.ko_questions[idx + 1] if idx + 1 < len(self.ko_questions) else None
|
||||
return None
|
||||
Reference in New Issue
Block a user