Merge pull request #4641 from normanjaeckel/FixMotionStateCreation
Server should not require restriction field for motion state. Fixed #…
This commit is contained in:
commit
483d759c88
@ -95,8 +95,6 @@ export class WorkflowRepositoryService extends BaseRepository<ViewWorkflow, Work
|
|||||||
public async addState(stateName: string, viewWorkflow: ViewWorkflow): Promise<void> {
|
public async addState(stateName: string, viewWorkflow: ViewWorkflow): Promise<void> {
|
||||||
const newStatePayload = {
|
const newStatePayload = {
|
||||||
name: stateName,
|
name: stateName,
|
||||||
// TODO: The server requires a string-array of restrictions. Should really not be necessary
|
|
||||||
restriction: [],
|
|
||||||
workflow_id: viewWorkflow.id
|
workflow_id: viewWorkflow.id
|
||||||
};
|
};
|
||||||
await this.httpService.post(this.restStateUrl, newStatePayload);
|
await this.httpService.post(this.restStateUrl, newStatePayload);
|
||||||
|
@ -96,7 +96,7 @@ class StateSerializer(ModelSerializer):
|
|||||||
Serializer for motion.models.State objects.
|
Serializer for motion.models.State objects.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
restriction = JSONField()
|
restriction = JSONField(required=False)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = State
|
model = State
|
||||||
|
Loading…
Reference in New Issue
Block a user