From a387bcb68b3af34bab15c794d3b701b0c1c3c214 Mon Sep 17 00:00:00 2001
From: mlbonhomme <bonhomme@teklia.com>
Date: Tue, 27 Jun 2023 11:59:56 +0000
Subject: [PATCH] Blank=True the description and compatible workers fields

---
 arkindex/training/migrations/0001_initial.py | 4 ++--
 arkindex/training/models.py                  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arkindex/training/migrations/0001_initial.py b/arkindex/training/migrations/0001_initial.py
index 56ad1bc37d..78d0212453 100644
--- a/arkindex/training/migrations/0001_initial.py
+++ b/arkindex/training/migrations/0001_initial.py
@@ -51,9 +51,9 @@ class Migration(migrations.Migration):
                 ('created', models.DateTimeField(auto_now_add=True)),
                 ('updated', models.DateTimeField(auto_now=True)),
                 ('name', models.CharField(max_length=100, unique=True)),
-                ('description', models.TextField(default='')),
+                ('description', models.TextField(default='', blank=True)),
                 ('public', models.BooleanField(default=False)),
-                ('compatible_workers', models.ManyToManyField(related_name='models', to='process.worker')),
+                ('compatible_workers', models.ManyToManyField(related_name='models', to='process.worker', blank=True)),
             ],
             options={
                 'abstract': False,
diff --git a/arkindex/training/models.py b/arkindex/training/models.py
index b0d57aeff7..9f36caea53 100644
--- a/arkindex/training/models.py
+++ b/arkindex/training/models.py
@@ -26,12 +26,12 @@ class Model(IndexableModel):
     # Name of the model, unique
     name = models.CharField(max_length=100, unique=True)
 
-    description = models.TextField(default="")
+    description = models.TextField(default="", blank=True)
 
     public = models.BooleanField(default=False)
 
     # Link to the workers that are able to use this model
-    compatible_workers = models.ManyToManyField('process.Worker', related_name='models')
+    compatible_workers = models.ManyToManyField('process.Worker', related_name='models', blank=True)
 
     # Memberships to handle access rights on models
     memberships = GenericRelation('users.Right', 'content_id')
-- 
GitLab