From 7f5132961f093d4857b3290397e8cd3c47f71558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sun, 12 Feb 2017 19:49:30 +0100 Subject: [PATCH] Add the cof_members group GestioCOF cannot run without it. There is no permission associated to it: this has to been thought about --- cof/migrations/0011_create_cof_group.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cof/migrations/0011_create_cof_group.py diff --git a/cof/migrations/0011_create_cof_group.py b/cof/migrations/0011_create_cof_group.py new file mode 100644 index 00000000..6c93a137 --- /dev/null +++ b/cof/migrations/0011_create_cof_group.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations + + +def create_cof_group(apps, schema_editor): + Group = apps.get_model("auth", "Group") + Group.objects.get_or_create(name="cof_members") + + +class Migration(migrations.Migration): + + dependencies = [ + ('cof', '0010_remove_cofprofile_is_cof'), + ] + + operations = [ + migrations.RunPython(create_cof_group, migrations.RunPython.noop) + ]