作业删除bug
This commit is contained in:
parent
d3e1505597
commit
b26db73227
|
@ -35,7 +35,7 @@ class OperationViewSet(CustomModelViewSet):
|
||||||
obj = self.get_object()
|
obj = self.get_object()
|
||||||
if obj.state != Operation.OP_CREATE:
|
if obj.state != Operation.OP_CREATE:
|
||||||
raise ParseError('非创建状态不可删除')
|
raise ParseError('非创建状态不可删除')
|
||||||
obj.delete(soft=False)
|
obj.delete()
|
||||||
return Response(status=204)
|
return Response(status=204)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue