Merge pull request #2393 from normanjaeckel/FixAutoupdateConnction
Reconnect autoupdate after some migrations. Fixed #2377.
This commit is contained in:
commit
4b0594a83b
@ -5,6 +5,8 @@ from __future__ import unicode_literals
|
|||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
from openslides.utils.autoupdate import inform_changed_data_receiver
|
||||||
|
|
||||||
|
|
||||||
def change_label_of_state(apps, schema_editor):
|
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.action_word = 'Refer to committee'
|
||||||
state.save()
|
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):
|
def add_recommendation_labels(apps, schema_editor):
|
||||||
"""
|
"""
|
||||||
|
@ -4,6 +4,8 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
from openslides.utils.autoupdate import inform_changed_data_receiver
|
||||||
|
|
||||||
|
|
||||||
def migrate_groups_and_user_permissions(apps, schema_editor):
|
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():
|
for permission in group_registered.permissions.all():
|
||||||
group.permissions.add(permission)
|
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):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user