From f327a4c9c4828438b968d128a6440016c071ee7e Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Thu, 11 Jul 2024 10:27:52 +0200 Subject: [PATCH] Patch observer oral min note Signed-off-by: Emmy D'Anello --- .../0022_alter_note_observer_oral.py | 44 +++++++++++++++++++ participation/models.py | 4 +- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 participation/migrations/0022_alter_note_observer_oral.py diff --git a/participation/migrations/0022_alter_note_observer_oral.py b/participation/migrations/0022_alter_note_observer_oral.py new file mode 100644 index 0000000..6dc47a3 --- /dev/null +++ b/participation/migrations/0022_alter_note_observer_oral.py @@ -0,0 +1,44 @@ +# Generated by Django 5.0.6 on 2024-07-11 08:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("participation", "0021_rename_defender_oral_note_reporter_oral_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="note", + name="observer_oral", + field=models.SmallIntegerField( + choices=[ + (-10, -10), + (-9, -9), + (-8, -8), + (-7, -7), + (-6, -6), + (-5, -5), + (-4, -4), + (-3, -3), + (-2, -2), + (-1, -1), + (0, 0), + (1, 1), + (2, 2), + (3, 3), + (4, 4), + (5, 5), + (6, 6), + (7, 7), + (8, 8), + (9, 9), + (10, 10), + ], + default=0, + verbose_name="observer oral note", + ), + ), + ] diff --git a/participation/models.py b/participation/models.py index f959033..a784ef0 100644 --- a/participation/models.py +++ b/participation/models.py @@ -1545,7 +1545,7 @@ class Pool(models.Model): for i in range(passages.count()): for j in range(passage_width): column = getcol(min_column + i * passage_width + j) - min_note = 0 + min_note = 0 if j < 7 else -10 max_note = 20 if j < 2 and settings.TFJM_APP == "TFJM" else 10 format_requests.append({ "setDataValidation": { @@ -2055,7 +2055,7 @@ class Note(models.Model): default=0, ) - observer_oral = models.PositiveSmallIntegerField( + observer_oral = models.SmallIntegerField( verbose_name=_("observer oral note"), choices=[(i, i) for i in range(-10, 11)], default=0,