Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

feat: add visible options parameter for span questions #63

Merged
5 changes: 4 additions & 1 deletion src/argilla_server/contexts/questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def _validate_settings_type(settings: QuestionSettings, settings_update: Questio


def _validate_label_options(settings: LabelSelectionQuestionSettings, settings_update: LabelSelectionSettingsUpdate):
# TODO: Validate visible_options on update
jfcalvo marked this conversation as resolved.
Show resolved Hide resolved
if settings_update.options is None:
return

Expand Down Expand Up @@ -142,7 +143,9 @@ async def create_question(db: AsyncSession, dataset: Dataset, question_create: Q
)


async def update_question(db: AsyncSession, question_id: UUID, question_update: QuestionUpdate, current_user: User):
async def update_question(
db: AsyncSession, question_id: UUID, question_update: QuestionUpdate, current_user: User
) -> Question:
question = await get_question_by_id(db, question_id)
if not question:
raise errors.NotFoundError()
Expand Down
Loading
Loading