diff --git a/backend/app/domain/services/base/example.py b/backend/app/domain/services/base/example.py index 00339747..803c3e25 100644 --- a/backend/app/domain/services/base/example.py +++ b/backend/app/domain/services/base/example.py @@ -226,6 +226,7 @@ def get_validate_configuration(self, task_id: int) -> dict: context_info = { "validation_user_input": config_yaml.get("validation_user_input"), "validation_context": config_yaml.get("validation_context"), + "validation_options": config_yaml.get("validation_options"), } return context_info diff --git a/backend/app/infrastructure/models/models.py b/backend/app/infrastructure/models/models.py index 183dc14f..28df46b0 100644 --- a/backend/app/infrastructure/models/models.py +++ b/backend/app/infrastructure/models/models.py @@ -466,7 +466,9 @@ class Validation(Base): id = Column(Integer, primary_key=True) uid = Column(ForeignKey("users.id"), index=True) eid = Column(ForeignKey("examples.id"), nullable=False, index=True) - label = Column(Enum("flagged", "correct", "incorrect", "placeholder")) + label = Column( + Enum("flagged", "correct", "incorrect", "placeholder", "safe", "unsafe") + ) mode = Column(Enum("user", "owner")) metadata_json = Column(Text) diff --git a/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectMultipleTextMultipleTags.tsx b/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectMultipleTextMultipleTags.tsx index 1e5e3acb..f90e95af 100644 --- a/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectMultipleTextMultipleTags.tsx +++ b/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectMultipleTextMultipleTags.tsx @@ -262,7 +262,7 @@ const SelectMultipleTextMultipleTags: FC< handleChange(value)} getSpan={(span) => ({ diff --git a/frontends/web/src/new_front/pages/CreateSamples/ValidateSamples.tsx b/frontends/web/src/new_front/pages/CreateSamples/ValidateSamples.tsx index 62d9f8e9..fb4ce3a8 100644 --- a/frontends/web/src/new_front/pages/CreateSamples/ValidateSamples.tsx +++ b/frontends/web/src/new_front/pages/CreateSamples/ValidateSamples.tsx @@ -141,7 +141,13 @@ const ValidateSamples: FC = () => { )} { setLabel(input.label); diff --git a/frontends/web/src/new_front/types/createSamples/createSamples/configurationTask.ts b/frontends/web/src/new_front/types/createSamples/createSamples/configurationTask.ts index 5404d75f..27d2138c 100644 --- a/frontends/web/src/new_front/types/createSamples/createSamples/configurationTask.ts +++ b/frontends/web/src/new_front/types/createSamples/createSamples/configurationTask.ts @@ -20,6 +20,7 @@ export type ConfigurationTask = { export type ValidationConfigurationTask = { validation_user_input: object[]; validation_context: object[]; + validation_options?: string[]; }; type ModelOutput = {