cnc程序的程序单更新

This commit is contained in:
jinling.yang
2024-06-05 16:26:34 +08:00
parent e258e43b51
commit 17e2a3ffc3

View File

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