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]: