diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/draftTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/draftTemplate.js index 135ad7ec3..9df731dd5 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/draftTemplate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/draftTemplate.js @@ -98,8 +98,8 @@ export default async function draftTemplate(request, response) { object.set('ExtUserPtr', extUserPtr); object.set('IsEnableOTP', isEnableOTP); object.set('IsTourEnabled', isTourEnabled); - const Public = isPublic !== undefined ? template?.IsPublic : false; - if (template?.IsPublic !== undefined) { + const Public = isPublic !== undefined ? isPublic : false; + if (isPublic !== undefined) { object.set('IsPublic', Public); } let contact = [];