From d108aaa55d76ceb397a0b422213df2eb7f3e8ec6 Mon Sep 17 00:00:00 2001 From: sagarika-padmanaban Date: Thu, 9 Jan 2025 21:01:15 +0530 Subject: [PATCH] fix for conceal --- .../migrations/0056_auto_20250109_1926.py | 23 +++++++++++++++++++ .../migrations/0061_project_conceal.py | 18 +++++++++++++++ backend/projects/models.py | 6 +++++ backend/projects/serializers.py | 3 +++ 4 files changed, 50 insertions(+) create mode 100644 backend/dataset/migrations/0056_auto_20250109_1926.py create mode 100644 backend/projects/migrations/0061_project_conceal.py diff --git a/backend/dataset/migrations/0056_auto_20250109_1926.py b/backend/dataset/migrations/0056_auto_20250109_1926.py new file mode 100644 index 00000000..6241b2ef --- /dev/null +++ b/backend/dataset/migrations/0056_auto_20250109_1926.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.14 on 2025-01-09 13:56 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dataset', '0055_auto_20241029_0902'), + ] + + operations = [ + migrations.AlterField( + model_name='interaction', + name='language', + field=models.CharField(choices=[('English', 'English'), ('Assamese', 'Assamese'), ('Bengali', 'Bengali'), ('Burmese', 'Burmese'), ('Bodo', 'Bodo'), ('Dogri', 'Dogri'), ('Gujarati', 'Gujarati'), ('Hindi', 'Hindi'), ('Kannada', 'Kannada'), ('Kashmiri', 'Kashmiri'), ('Konkani', 'Konkani'), ('Maithili', 'Maithili'), ('Malayalam', 'Malayalam'), ('Manipuri', 'Manipuri'), ('Marathi', 'Marathi'), ('Nepali', 'Nepali'), ('Odia', 'Odia'), ('Punjabi', 'Punjabi'), ('Sanskrit', 'Sanskrit'), ('Santali', 'Santali'), ('Sindhi', 'Sindhi'), ('Sinhala', 'Sinhala'), ('Tamil', 'Tamil'), ('Telugu', 'Telugu'), ('Thai', 'Thai'), ('Urdu', 'Urdu')], help_text='Language of the interaction', max_length=20, verbose_name='Language'), + ), + migrations.AlterField( + model_name='multimodelinteraction', + name='language', + field=models.CharField(choices=[('English', 'English'), ('Assamese', 'Assamese'), ('Bengali', 'Bengali'), ('Burmese', 'Burmese'), ('Bodo', 'Bodo'), ('Dogri', 'Dogri'), ('Gujarati', 'Gujarati'), ('Hindi', 'Hindi'), ('Kannada', 'Kannada'), ('Kashmiri', 'Kashmiri'), ('Konkani', 'Konkani'), ('Maithili', 'Maithili'), ('Malayalam', 'Malayalam'), ('Manipuri', 'Manipuri'), ('Marathi', 'Marathi'), ('Nepali', 'Nepali'), ('Odia', 'Odia'), ('Punjabi', 'Punjabi'), ('Sanskrit', 'Sanskrit'), ('Santali', 'Santali'), ('Sindhi', 'Sindhi'), ('Sinhala', 'Sinhala'), ('Tamil', 'Tamil'), ('Telugu', 'Telugu'), ('Thai', 'Thai'), ('Urdu', 'Urdu')], help_text='Language of the interaction', max_length=20, verbose_name='Language'), + ), + ] diff --git a/backend/projects/migrations/0061_project_conceal.py b/backend/projects/migrations/0061_project_conceal.py new file mode 100644 index 00000000..f7e25d1e --- /dev/null +++ b/backend/projects/migrations/0061_project_conceal.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.14 on 2025-01-09 13:56 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0060_auto_20241029_0902'), + ] + + operations = [ + migrations.AddField( + model_name='project', + name='conceal', + field=models.BooleanField(default=False, help_text='To hide annotator,reviewer and superchecker details.', verbose_name='conceal'), + ), + ] diff --git a/backend/projects/models.py b/backend/projects/models.py index a8dde8c6..2bb3851a 100644 --- a/backend/projects/models.py +++ b/backend/projects/models.py @@ -133,6 +133,12 @@ class Project(models.Model): default=False, help_text=("Indicates whether a project is archieved or not."), ) + conceal = models.BooleanField( + verbose_name="conceal", + default=False, + help_text=("To hide annotator,reviewer and superchecker details."), + ) + is_published = models.BooleanField( verbose_name="project_is_published", default=False, diff --git a/backend/projects/serializers.py b/backend/projects/serializers.py index edcd9e67..34cc85a2 100644 --- a/backend/projects/serializers.py +++ b/backend/projects/serializers.py @@ -22,6 +22,7 @@ class Meta: "description", "created_by", "is_archived", + "conceal", "is_published", "annotators", "annotation_reviewers", @@ -62,6 +63,7 @@ class Meta: "description", "is_archived", "is_published", + "conceal", "annotators", "annotation_reviewers", "review_supercheckers", @@ -82,6 +84,7 @@ class Meta: "description", "created_by", "is_archived", + "conceal", "is_published", "workspace_id", "organization_id",