OpenSlides/server/openslides/motions/migrations/0026_rename_restriction.py
FinnStutzenstein 2bcab5d098
Repository restructure
- moved all server related things into the folder `server`, so this
configuration is parallel to the client.
- All main "services" are now folders in the root directory
- Added Dockerfiles to each service (currently server and client)
- Added a docker compose configuration to start everything together.
Currently there are heavy dependencies into https://github.com/OpenSlides/openslides-docker-compose
- Resturctured the .gitignore. If someone needs something excluded,
please add it to the right section.
- Added initial build setup with Docker and docker-compose.
- removed setup.py. We won't deliver OpenSlides via pip anymore.
2020-08-21 08:11:13 +02:00

23 lines
675 B
Python

# Generated by Finn Stutzenstein on 2019-04-29 08:51
from django.db import migrations
def rename_manager_restriction(apps, schema_editor):
"""
Renames 'managers_only' to 'motions.can_manage'
"""
State = apps.get_model("motions", "State")
for state in State.objects.all():
for i in range(len(state.restriction)):
if state.restriction[i] == "managers_only":
state.restriction[i] = "motions.can_manage"
state.save(skip_autoupdate=True)
class Migration(migrations.Migration):
dependencies = [("motions", "0025_motion_category_weight")]
operations = [migrations.RunPython(rename_manager_restriction)]