From 17e2a3ffc3b31248fb6bed405fd8b71002b611dd Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Wed, 5 Jun 2024 16:26:34 +0800 Subject: [PATCH] =?UTF-8?q?cnc=E7=A8=8B=E5=BA=8F=E7=9A=84=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=8D=95=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index d8e6fe02..1751a9e3 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1039,10 +1039,8 @@ class CNCprocessing(models.Model): for f in files: if os.path.splitext(f)[1] == ".pdf": full_path = os.path.join(serverdir, root, f) - if full_path is not False: - if not cnc_processing.workorder_id.cnc_worksheet: - cnc_processing.workorder_id.cnc_worksheet = base64.b64encode( - open(full_path, 'rb').read()) + cnc_processing.workorder_id.cnc_worksheet = base64.b64encode( + open(full_path, 'rb').read()) else: if f in program_path: # if cnc_processing.program_name == f.split('.')[0]: