From 34e3cfa6b5e248c268098eb91e02674d8d729b84 Mon Sep 17 00:00:00 2001 From: Valentin Rigal <rigal@teklia.com> Date: Fri, 29 Mar 2024 15:11:38 +0100 Subject: [PATCH] Update model and serializer --- arkindex/training/models.py | 1 + arkindex/training/serializers.py | 1 + 2 files changed, 2 insertions(+) diff --git a/arkindex/training/models.py b/arkindex/training/models.py index c37ea35b09..ea84bd5c8a 100644 --- a/arkindex/training/models.py +++ b/arkindex/training/models.py @@ -266,6 +266,7 @@ class Dataset(models.Model): name = models.CharField(max_length=100, validators=[MinLengthValidator(1)]) description = models.TextField(validators=[MinLengthValidator(1)]) state = EnumField(DatasetState, default=DatasetState.Open, max_length=50) + unique_elements = models.BooleanField(default=True) class Meta: constraints = [ diff --git a/arkindex/training/serializers.py b/arkindex/training/serializers.py index ce877bff5f..4b6636af78 100644 --- a/arkindex/training/serializers.py +++ b/arkindex/training/serializers.py @@ -636,6 +636,7 @@ class DatasetSerializer(serializers.ModelSerializer): # Hidden field to set the creator as the authenticated user "default_creator", "task_id", + "unique_elements", "created", "updated", ) -- GitLab