feat: mlogbin初始化质检表的bug
This commit is contained in:
parent
7a290f9af6
commit
4f1bbaa574
|
|
@ -510,7 +510,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
|
||||||
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).order_by("-create_time").first()
|
qctmat0 = QctMat.objects.filter(material=mlogbin.material_in, qct__is_deleted=False).order_by("-create_time").first()
|
||||||
if qctmat0:
|
if qctmat0:
|
||||||
mlogbin.qct = qctmat0.qct
|
mlogbin.qct = qctmat0.qct
|
||||||
mlogbin.save()
|
mlogbin.save()
|
||||||
|
|
@ -549,7 +549,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
|
||||||
d_count_real = xcount
|
d_count_real = xcount
|
||||||
d_count_ok = xcount
|
d_count_ok = xcount
|
||||||
# 找寻质检表
|
# 找寻质检表
|
||||||
qctmat = QctMat.objects.filter(material=material_out).order_by("-create_time").first()
|
qctmat = QctMat.objects.filter(material=material_out, qct__is_deleted=False).order_by("-create_time").first()
|
||||||
qct = None
|
qct = None
|
||||||
if qctmat:
|
if qctmat:
|
||||||
qct = qctmat.qct
|
qct = qctmat.qct
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue