feat: route update 时from_route存在则不可修改关键信息
This commit is contained in:
parent
ba0e86d834
commit
a6b320bad6
|
@ -378,7 +378,7 @@ class RouteViewSet(CustomModelViewSet):
|
|||
if routepack and routepack.state != RoutePack.RP_S_CREATE:
|
||||
raise ParseError('该工艺路线非创建中不可编辑')
|
||||
ins_n:Route = serializer.save()
|
||||
if ins_n.material_in != old_m_in or ins_n.material_out != old_m_out or ins_n.process != process:
|
||||
if ins.from_route and ins_n.material_in != old_m_in or ins_n.material_out != old_m_out or ins_n.process != process:
|
||||
raise ParseError("该工艺步骤被其他步骤引用, 无法修改关键信息")
|
||||
|
||||
def perform_destroy(self, instance:Route):
|
||||
|
|
Loading…
Reference in New Issue