It's really irritating to be forced to specify a value for this field
especially as it'll get auto-populated by the update script. Set
blank=True to allow that. While we're at it, touch up the description a
bit to make more sense.

Signed-off-by: Paul Eggleton <[email protected]>
---
 layerindex/migrations/0009_layerbranch_collection.py | 19 +++++++++++++++++++
 layerindex/models.py                                 |  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 layerindex/migrations/0009_layerbranch_collection.py

diff --git a/layerindex/migrations/0009_layerbranch_collection.py 
b/layerindex/migrations/0009_layerbranch_collection.py
new file mode 100644
index 0000000..bf6276f
--- /dev/null
+++ b/layerindex/migrations/0009_layerbranch_collection.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('layerindex', '0008_yp_compatible'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='layerbranch',
+            name='collection',
+            field=models.CharField(help_text='Name of the collection that the 
layer provides for the purpose of expressing dependencies (as specified in 
BBFILE_COLLECTIONS). Can only contain letters, numbers and dashes.', 
max_length=40, blank=True, null=True, verbose_name='Layer Collection'),
+        ),
+    ]
diff --git a/layerindex/models.py b/layerindex/models.py
index e99f0b8..b39518a 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -157,7 +157,7 @@ class YPCompatibleVersion(models.Model):
 class LayerBranch(models.Model):
     layer = models.ForeignKey(LayerItem)
     branch = models.ForeignKey(Branch)
-    collection = models.CharField('Layer Collection', max_length=40, 
null=True, help_text='Name of the layer that could be used in the list of 
dependencies - can only contain letters, numbers and dashes')
+    collection = models.CharField('Layer Collection', max_length=40, 
null=True, blank=True, help_text='Name of the collection that the layer 
provides for the purpose of expressing dependencies (as specified in 
BBFILE_COLLECTIONS). Can only contain letters, numbers and dashes.')
     version = models.CharField('Layer Version', max_length=10, null=True, 
blank=True, help_text='The layer version for this particular branch.')
     vcs_subdir = models.CharField('Repository subdirectory', max_length=40, 
blank=True, help_text='Subdirectory within the repository where the layer is 
located, if not in the root (usually only used if the repository contains more 
than one layer)')
     vcs_last_fetch = models.DateTimeField('Last successful fetch', blank=True, 
null=True)
-- 
2.9.5

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to