feat: mlogbin无需加载qct
This commit is contained in:
parent
4f1bbaa574
commit
0429ac6988
|
@ -509,11 +509,6 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
|
||||||
@transaction.atomic
|
@transaction.atomic
|
||||||
def perform_create(self, serializer):
|
def perform_create(self, serializer):
|
||||||
mlogbin: Mlogb = serializer.save()
|
mlogbin: Mlogb = serializer.save()
|
||||||
# 找寻质检表
|
|
||||||
qctmat0 = QctMat.objects.filter(material=mlogbin.material_in, qct__is_deleted=False).order_by("-create_time").first()
|
|
||||||
if qctmat0:
|
|
||||||
mlogbin.qct = qctmat0.qct
|
|
||||||
mlogbin.save()
|
|
||||||
mlog:Mlog = mlogbin.mlog
|
mlog:Mlog = mlogbin.mlog
|
||||||
route:Route = mlog.route
|
route:Route = mlog.route
|
||||||
# 以及mlogbw
|
# 以及mlogbw
|
||||||
|
|
Loading…
Reference in New Issue