* fix: only use non-empty Q object as interim group filter * refactor: add with_meetings queryset to GroupManager * test: users can only request interims for managed groups * fix: find managed groups from groupman_roles/authroles * feat: let chair manage directorate groups * test: remove debug statements and unused imports * test: remove do-nothing code from test
31 lines
810 B
Python
31 lines
810 B
Python
# Generated by Django 2.2.28 on 2022-06-14 13:14
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def forward(apps, schema_editor):
|
|
GroupFeatures = apps.get_model('group', 'GroupFeatures')
|
|
features = GroupFeatures.objects.get(type_id='dir')
|
|
if 'chair' not in features.groupman_roles:
|
|
features.groupman_roles.append('chair')
|
|
features.save()
|
|
|
|
|
|
def reverse(apps, schema_editor):
|
|
GroupFeatures = apps.get_model('group', 'GroupFeatures')
|
|
features = GroupFeatures.objects.get(type_id='dir')
|
|
if 'chair' in features.groupman_roles:
|
|
features.groupman_roles.remove('chair')
|
|
features.save()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('group', '0055_editorial_stream'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(forward, reverse),
|
|
]
|