OpenSlides/server/openslides/motions/migrations/0021_state_access_level_2.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

25 lines
800 B
Python

# Generated by Django 2.1.5 on 2019-02-01 11:58
from django.db import migrations
def transform_required_permission_to_see_field(apps, schema_editor):
"""
Sets new access_level of states to EXTENDED_MANAGERS_AND_SUBMITTER
if required_permission_to_see is given
"""
# We get the model from the versioned app registry;
# if we directly import it, it will be the wrong version.
State = apps.get_model("motions", "State")
for state in State.objects.all():
if state.required_permission_to_see:
state.access_level = 1
state.save(skip_autoupdate=True)
class Migration(migrations.Migration):
dependencies = [("motions", "0021_state_access_level_1")]
operations = [migrations.RunPython(transform_required_permission_to_see_field)]