- aggiornato la versione STAMPA, che non funzionava
This commit is contained in:
@@ -419,7 +419,7 @@ async function deleteOldMyElems(idapp) {
|
||||
|
||||
/**
|
||||
* Trova tutte le schede template associate a pagine di idapp.
|
||||
* Restituisce un array di oggetti con le seguenti proprietà:
|
||||
* Restituisce un array di ogge tti con le seguenti proprietà:
|
||||
* - scheda: l'oggetto scheda, con proprietà come _id, name, isTemplate
|
||||
* - idPageOrig: l'idPage originale associata alla scheda
|
||||
*
|
||||
@@ -484,7 +484,7 @@ MyElemSchema.statics.findallSchedeTemplate = async function (idapp) {
|
||||
|
||||
if (resultWithTitles.length > 0) {
|
||||
console.log('Duplicati e titoli delle pagine:', JSON.stringify(resultWithTitles, null, 2));
|
||||
await deleteOldMyElems(idapp);
|
||||
// await deleteOldMyElems(idapp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ const MyPageSchema = new Schema({
|
||||
only_admin: {
|
||||
type: Boolean,
|
||||
},
|
||||
only_collab: {
|
||||
type: Boolean,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
},
|
||||
@@ -211,6 +214,7 @@ MyPageSchema.statics.findOnlyStruttRec = async function (idapp) {
|
||||
isTemplate: 1,
|
||||
only_residenti: 1,
|
||||
only_admin: 1,
|
||||
only_collab: 1,
|
||||
inmenu: 1,
|
||||
submenu: 1,
|
||||
iconsize: 1,
|
||||
@@ -239,6 +243,7 @@ MyPageSchema.statics.findInternalPages = async function (idapp) {
|
||||
onlyif_logged: 1,
|
||||
only_residenti: 1,
|
||||
only_admin: 1,
|
||||
only_collab: 1,
|
||||
}).lean();
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user