feat: route update 时from_route存在则不可修改关键信息3
This commit is contained in:
parent
7d2f11f194
commit
872e59ffe1
|
@ -378,7 +378,7 @@ class RouteViewSet(CustomModelViewSet):
|
|||
if routepack and routepack.state != RoutePack.RP_S_CREATE:
|
||||
raise ParseError('该工艺路线非创建中不可编辑')
|
||||
ins_n:Route = serializer.save()
|
||||
if Route.objects.filter(from_route__id=ins.id).exists() and ins_n.material_in != old_m_in or ins_n.material_out != old_m_out or ins_n.process != process:
|
||||
if Route.objects.filter(from_route__id=ins.id).exists() 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