Commit 59738f9c authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_mrp_quality_assurance: not need to set value if vin is also None

parent 396fb981
...@@ -84,7 +84,7 @@ if portal_type == "Traceability": ...@@ -84,7 +84,7 @@ if portal_type == "Traceability":
return [] return []
else: else:
assurance_document = context.getAggregateValue(portal_type=portal_type) assurance_document = context.getAggregateValue(portal_type=portal_type)
if not assurance_document.getAggregate(portal_type="VIN"): if (not assurance_document.getAggregate(portal_type="VIN")) and vin:
assurance_document.setAggregateValue(vin, portal_type="VIN") assurance_document.setAggregateValue(vin, portal_type="VIN")
...@@ -107,7 +107,7 @@ else: ...@@ -107,7 +107,7 @@ else:
assurance_document.plan() assurance_document.plan()
else: else:
assurance_document = context.getAggregateValue(portal_type=portal_type) assurance_document = context.getAggregateValue(portal_type=portal_type)
if not assurance_document.getAggregate(portal_type="VIN"): if (not assurance_document.getAggregate(portal_type="VIN")) and vin:
assurance_document.setAggregateValue(vin, portal_type="VIN") assurance_document.setAggregateValue(vin, portal_type="VIN")
return [] return []
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment