Server should not require restriction field for motion state. Fixed #4622.
This commit is contained in:
parent
0675bdcf46
commit
3d6e87e1ef
@ -95,8 +95,6 @@ export class WorkflowRepositoryService extends BaseRepository<ViewWorkflow, Work
|
||||
public async addState(stateName: string, viewWorkflow: ViewWorkflow): Promise<void> {
|
||||
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);
|
||||
|
@ -96,7 +96,7 @@ class StateSerializer(ModelSerializer):
|
||||
Serializer for motion.models.State objects.
|
||||
"""
|
||||
|
||||
restriction = JSONField()
|
||||
restriction = JSONField(required=False)
|
||||
|
||||
class Meta:
|
||||
model = State
|
||||
|
Loading…
Reference in New Issue
Block a user