- 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:
Josako
2025-07-25 22:35:08 +02:00
parent ba523a95c5
commit 42ffe3795f
13 changed files with 258 additions and 102 deletions

View File

@@ -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