diff --git a/models/Odmdb.js b/models/Odmdb.js index 8577aeb..740d942 100644 --- a/models/Odmdb.js +++ b/models/Odmdb.js @@ -658,7 +658,7 @@ Odmdb.cud = (objectPathname, crud, itm, role, runindex = true) => { if (crud == "U" && accessright.U.length > 0) { itmtostore = itmold; const keynotallow = Object.keys(itm).filter( - (el) => !accessright.U.includes(el) + (el) => !(el==getschema.data.schema.apxid || accessright.U.includes(el)) ); if (keynotallow.length > 0) { feedbackinfo.keynotallow = keynotallow; @@ -704,7 +704,7 @@ Odmdb.cud = (objectPathname, crud, itm, role, runindex = true) => { fs.ensureDirSync(`${objectPathname}/img/`); //console.log("check this for k:", k, " itmtostore[k]:", itmtostore[k]); const imgb64 = itmtostore[k].replace( - /^data:image\/(png|png|gif|bmp|jpg|jpeg);base64,/, + /^data:image\/(png|gif|bmp|jpg|jpeg);base64,/, "" ); //.replace(/\+/g," "); const extension = itmtostore[k].split(";base64,")[0].split("/")[1];