From 3d6e87e1ef538ba819cff036f38c372e802cffc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Sat, 27 Apr 2019 16:23:31 +0200 Subject: [PATCH] Server should not require restriction field for motion state. Fixed #4622. --- .../core/repositories/motions/workflow-repository.service.ts | 2 -- openslides/motions/serializers.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/app/core/repositories/motions/workflow-repository.service.ts b/client/src/app/core/repositories/motions/workflow-repository.service.ts index aa88c1072..5c2a06daa 100644 --- a/client/src/app/core/repositories/motions/workflow-repository.service.ts +++ b/client/src/app/core/repositories/motions/workflow-repository.service.ts @@ -95,8 +95,6 @@ export class WorkflowRepositoryService extends BaseRepository { const newStatePayload = { name: stateName, - // TODO: The server requires a string-array of restrictions. Should really not be necessary - restriction: [], workflow_id: viewWorkflow.id }; await this.httpService.post(this.restStateUrl, newStatePayload); diff --git a/openslides/motions/serializers.py b/openslides/motions/serializers.py index a7dc59210..7fd5ec1b3 100644 --- a/openslides/motions/serializers.py +++ b/openslides/motions/serializers.py @@ -96,7 +96,7 @@ class StateSerializer(ModelSerializer): Serializer for motion.models.State objects. """ - restriction = JSONField() + restriction = JSONField(required=False) class Meta: model = State