Reconnect autoupdate after some migrations. Fixed #2377.
This commit is contained in:
parent
27223c35d9
commit
5f65830d47
@ -5,6 +5,8 @@ from __future__ import unicode_literals
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
from openslides.utils.autoupdate import inform_changed_data_receiver
|
||||
|
||||
|
||||
def change_label_of_state(apps, schema_editor):
|
||||
"""
|
||||
@ -27,6 +29,11 @@ def change_label_of_state(apps, schema_editor):
|
||||
state.action_word = 'Refer to committee'
|
||||
state.save()
|
||||
|
||||
# Reconnect autoupdate.
|
||||
models.signals.post_save.connect(
|
||||
inform_changed_data_receiver,
|
||||
dispatch_uid='inform_changed_data_receiver')
|
||||
|
||||
|
||||
def add_recommendation_labels(apps, schema_editor):
|
||||
"""
|
||||
|
@ -4,6 +4,8 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
from openslides.utils.autoupdate import inform_changed_data_receiver
|
||||
|
||||
|
||||
def migrate_groups_and_user_permissions(apps, schema_editor):
|
||||
"""
|
||||
@ -50,6 +52,11 @@ def migrate_groups_and_user_permissions(apps, schema_editor):
|
||||
for permission in group_registered.permissions.all():
|
||||
group.permissions.add(permission)
|
||||
|
||||
# Reconnect autoupdate.
|
||||
models.signals.post_save.connect(
|
||||
inform_changed_data_receiver,
|
||||
dispatch_uid='inform_changed_data_receiver')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user